标签:
//1,获取沙盒目录路径的函数:
NSString *homeDir = NSHomeDirectory();
//2,获取Documents目录路径的方法:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *docDir = [paths objectAtIndex:0];
//3,获取Caches目录路径的方法:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask,YES);
NSString *cachesDir = [paths objectAtIndex:0];
//4,获取tmp目录路径的方法:
NSString *tmpDir = NSTemporaryDirectory();
获取沙盒路径,Documents目录路径,Caches目录路径,tmp目录路径的方法
标签:
原文地址:http://www.cnblogs.com/xhc1263478959/p/4784253.html