Creat folders -创建文件夹
来源:互联网 发布:淘宝代画效果图被骗 编辑:程序博客网 时间:2024/06/14 13:50
1。实现
- (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(NSDictionary *)attributes error:(NSError **)error
createIntermediates:YES-若path中某一目录不存在,则创建它
NO-若path中某一目录不存在,则此方法返回NO,创建失败
例如:要创建文件夹.../tmp/data/images,其中,data文件夹不存在,若用YES,则此方法会连带创建data及data下的images;若NO,则创建失败
e.g.
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSString *tempDir = NSTemporaryDirectory();
NSString *imagesDir = [tempDir stringByAppendingPathComponent:@"images"];
NSError *error = nil;
if ([fileManager createDirectoryAtPath:imagesDir withIntermediateDirectories:YES attributes:nil error:&error]){
NSLog(@"Successfully created the directory");
} else {
NSLog(@"Failed to create the directory. Error = %@", error);
}
- Creat folders -创建文件夹
- Professional ASP.NET 2.0之应用程序文件夹-Application Folders
- creat函数:创建一个文件
- 3.4 creat函数-创建文件
- 极速文件夹(flash folders) 绿色
- javascript之操作文件夹(Folders)
- VMware中Shared Folders(共享文件夹)配置
- creat
- Minix创建文件:creat,open操作
- VMWare share folders无法访问宿主机器的共享文件夹
- VMware中Shared Folders(共享文件夹)的配置
- delete Files and Folders(删除文件、文件夹)
- 用creat创建已存在的文件会发生什么
- MySQL索引的创建、删除 index creat/delete
- UI Automation-creat XML(二)
- 创建文件夹
- 创建文件夹
- 创建文件夹
- poj1185 炮兵阵地 (DP状态压缩)
- 监控SQL:执行表中所有sql语句、记录每个语句运行时间(3)
- Extjs学习心得
- WebService 的创建,部署和使用
- 自己封装的关于jquery easyUI的datetimebox开始时间不能大于结束时间的判断
- Creat folders -创建文件夹
- html 中div不自动换行
- 64位平台C/C++开发注意事项
- protobuf安装及一个Demo
- Spring技术内幕总结
- android 的图片压缩
- ORACLE的工作机制
- voltdb官方文档翻译(一)
- error: src refspec master does not match any.