首页 > 其他 > 详细

创建文件夹

时间:2015-05-13 19:33:00      阅读:179      评论:0      收藏:0      [点我收藏+]
 NSString *homePath = NSHomeDirectory();
    NSString *systemLogPath = [homePath stringByAppendingPathComponent:@"Documents/DearMob/SystemLog"];
    NSLog(@"%@",systemLogPath);
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsPath = [paths objectAtIndex:0];
    
    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSString *testDirectory = [documentsPath stringByAppendingPathComponent:@"DearMob/SystemLog"];
    NSLog(@"%@",testDirectory);
    // 创建目录
    BOOL res=[fileManager createDirectoryAtPath:systemLogPath withIntermediateDirectories:YES attributes:nil error:nil];

 

创建文件夹

原文:http://www.cnblogs.com/ZhangYuGe/p/4501076.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!