#pragma mark 创建文件夹
- (void)createDocumentsPath
{
NSString *createFilePath = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Documents/试一试"]];
if ([[NSFileManager defaultManager] fileExistsAtPath:createFilePath]) {
//文件夹已存在
NSLog(@"试一试文件夹 已经存在!!!!!");
return;
} else {
//创建文件夹
bool Exists = [[NSFileManager defaultManager] createDirectoryAtPath:createFilePath withIntermediateDirectories:YES attributes:nil error:nil];
if (Exists) {
NSLog(@"创建试一试文件夹 成功!!!!!");
}else{
NSLog(@"创建试一试文件夹 失败!!!!!");
}
}
}
网友评论