NSDictionary *fileAttributes = [[NSFileManager defaultManager] fileAttributesAtPath:path traverseLink:YES];
unsigned long long length = [fileAttributes fileSize];
float ff = length/1024.0/1024.0;
NSLog(@"length== %.2f",ff);
---------------------
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
//如果存在就删除
[[NSFileManager defaultManager] removeItemAtPath: path error:nil];
}
时间: 2024-11-05 22:41:22