标签:
NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *homePath = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
NSString *libraryPath = [homePath objectAtIndex:0];
NSString *tempPath = [libraryPath stringByAppendingPathComponent:@"Application Support"];
//判断temp文件夹是否存在
BOOL tempFileExists = [fileManager fileExistsAtPath:tempPath];
if (!tempFileExists) {//如果不存在说创建,因为下载时,不会自动创建文件夹
NSLog(@"没有");
} else {
NSLog(@"有");
}
标签:
原文地址:http://www.cnblogs.com/xvewuzhijing/p/5001448.html