基础类方法:
//文件时间
+ (BOOL)fileIsOutofDate:(NSString* )filepath
{
NSDictionary* file_info = [[NSFileManager defaultManager] attributesOfItemAtPath:filepath error:nil];
NSDate* file_date = [file_info objectForKey:@"NSFileCreationDate"];
NSDate* today = [[NSDate alloc]init];
//此处判断30天
if (fabs([today timeIntervalSinceDate:file_date]) > 30*24*60*60 )
{
return YES;
}
return NO;
}