标签:
NSString *path = NSHomeDirectory();//主目录 NSLog(@"NSHomeDirectory:%@",path); NSString *userName = NSUserName();//与上面相同 NSString *rootPath = NSHomeDirectoryForUser(userName); NSLog(@"NSHomeDirectoryForUser:%@",rootPath); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory=[paths objectAtIndex:0];//Documents目录 NSLog(@"NSDocumentDirectory:%@",documentsDirectory);
标签:
原文地址:http://www.cnblogs.com/hxwj/p/4742541.html