NSString *rootPath=NSHomeDirectory();
NSLog(@"根目录:%@",rootPath);
//查找documents文件夹路径
// NSString *documentsPath=[NSString stringWithFormat:@"%@/Documents",rootPath];
//NSString类提供了快捷的方式完成***/**这种拼接模式
NSString *documentsPath=[rootPath stringByAppendingPathComponent:@"Documents"];
NSLog(@"Documents:%@",documentsPath);
//获取library文件夹路径
NSString *libraryPath=[rootPath stringByAppendingPathComponent:@"Library"];
NSLog(@"Library:%@",libraryPath);
//tmp文件夹路径
NSString *tmpPath=[rootPath stringByAppendingPathComponent:@"tmp"];
网友评论