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];