#pragma mark-----获取单个文件大小
+ (float)getSizeOfDataBaseName:(NSString *)dataBaseName{
NSString* path = [NSString stringWithFormat:@"/%@/%@",[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject],dataBaseName];
//获取单个文件大小-- 单位为M
NSFileManager* manager = [NSFileManager defaultManager];
if ([manager fileExistsAtPath:path]) {
return [[manager attributesOfItemAtPath:path error:nil] fileSize]/(1024.0*1024.0);
}
return 0;
}