我正在使用以下方法将文件从 Dropbox 下载到用户的 Documents 文件夹中:
[[self restClient] loadFile:filepath intoPath:[self getDocumentPath]];
-(NSString *)getDocumentPath {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *filepath = [[NSUserDefaults standardUserDefaults] stringForKey:@"filepathDropbox"];
NSString *path = [[paths objectAtIndex:0] stringByAppendingPathComponent:filepath];
[[NSUserDefaults standardUserDefaults] setObject:path forKey:@"filepathDropbox"];
return path;
}
完成后,如何在本地 iphone 上访问此文件?