标签:
获取主要目录路径的方式 沙盒目录 NSLog(@"%@",NSHomeDirectory()); MyApp.app NSLog(@"%@",[[NSBundle mainBundle] bundlePath]); tmp NSLog(@"%@",NSTemporaryDirectory()); Documents NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docPath = [paths objectAtIndex:0]; NSLog(@"%@",docPath); Library NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); NSString *libPath = [paths objectAtIndex:0]; NSLog(@"%@",libPath);
标签:
原文地址:http://www.cnblogs.com/fkunlam/p/4867481.html