Ios6 获取神奇记录存储文件的路径
获取Cocoa错误260,表示找不到文件Ios6 获取神奇记录存储文件的路径,ios6,nsfilemanager,magicalrecord,Ios6,Nsfilemanager,Magicalrecord,获取Cocoa错误260,表示找不到文件 NSArray *inputPaths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[[[NSPersistentStore MR_defaultLocalStoreUrl]absoluteString]stringByDeletingLastPathComponent]error:&folderError]; if (folderError) {
NSArray *inputPaths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:[[[NSPersistentStore MR_defaultLocalStoreUrl]absoluteString]stringByDeletingLastPathComponent]error:&folderError];
if (folderError) {
[SVProgressHUD showErrorWithStatus:folderError.localizedDescription];
}
为什么??或者是通过其他方式获取存储文件路径?在这里找到了答案:
absoluteString
仅用于远程URL,对于本地文件URL应使用path