我在 Dropbox 上有一个包含多个子目录和文件的远程目录。
远端:
-Mobile Profiles *(root)*
-- Custom Profiles
--- Profile1
--- Profile2
--- Profile3
上传文件和目录/以及带有文件的子目录不是问题。在将子目录及其内容从 Dropbox 获取到设备时,我脑子里一片空白。
放
-(void)backupCustomProfiles {
for ( NSString *file in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MP_CUSTOM error:&error] ) {
[self.restClient uploadFile:file toPath:@"/Mobile Profiles/Custom Profiles/" fromPath:EasyStrings(MP_CUSTOM,file)];
}
}
得到
-(void)restoreCustomProfiles {
for ( ) {
/* ? */
}
}
我不确定如何遍历远程端的子目录。