标签:
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