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

 

posted on 2015-05-13 17:24  墓厄  阅读(149)  评论(0编辑  收藏  举报