标签:
创建文件夹:
NSString *imageDir = [NSString stringWithFormat:@"%@/Caches/%@", NSHomeDirectory(), dirName];
BOOL isDir = NO;
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL existed = [fileManager fileExistsAtPath:imageDir isDirectory:&isDir];
if ( !(isDir == YES && existed == YES) )
{
[fileManager createDirectoryAtPath:imageDir withIntermediateDirectories:YES attributes:nil error:nil];
}
NSString *imageDir = [NSString stringWithFormat:@"%@/Caches/%@", NSHomeDirectory(), dirName];
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager removeItemAtPath:imageDir error:nil];
标签:
原文地址:http://www.cnblogs.com/hl-iOS/p/5856531.html