寻找沙盒中Documents文件夹
NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES) firstObject];
这个路径打印的是:/Users/mac/Library/Application Support/iPhone Simulator/5.0/Applications/C5006DC7-CC88-42F9-B02C-EB0CC686DB86/Library/Documentation
当在本地寻找这个路径的时候,却只能找到Library,Library文件夹下并没有Documentation。
NSString *paths = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
是因为代码错误,是NSDocumentDirectory,不是NSDocumentationDirectory
如此,打印出来的路径才是我们要找的沙盒中的Documents