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

 

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-07-09
  • 2021-06-02
  • 2022-01-12
  • 2021-07-24
  • 2021-07-20
  • 2021-09-01
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-03-02
相关资源
相似解决方案