标签:blog class code string c com
有两种写法可以获取到Documents的路径
1.
|
1 |
NSString
*path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; |
这种写法不是很严谨
2.
|
1
2 |
NSArray
*filePath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString
*documentPath = [filePath objectAtIndex:0]; |
这种获取路径的方法比较好,不是自己写死了路径。
获取App的Documents路径,布布扣,bubuko.com
标签:blog class code string c com
原文地址:http://www.cnblogs.com/huangzizhu/p/3714975.html