2011-05-25 106 views
3

我使用Dropbox API並嘗試下載文件夾,但它不工作。我可以下載任何類型的文件,但不是整個文件夾..Here是我的代碼,我用來下載文件使用Dropbox API下載文件夾時出現的問題

NSLog(@"called"); 

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 

    NSString *file = [NSString stringWithFormat:@"/%@",[metaArray objectAtIndex:indexPath.row]]; 

    //NSString *file = @"/Photos"; 
    NSString *path = [NSString stringWithFormat:@"%@/Downloaded Data/%@", [paths objectAtIndex:0],file]; 

    //NSString *str = [NSString stringWithFormat:@"%@/Downloaded Data",path]; 

    [self.restClient loadFile:file intoPath:path]; 

    NSLog(@"Downloaded"); 

請幫助

回答

0

裝入目錄元數據,然後加載它引用的文件,代碼見post

+0

檢查此鏈接,但困惑,因爲我想下載folder.I顯示元數據在表視圖。這是顯示文件和文件夾從@「/」root.I選擇要下載的文件,但不適用於文件夾。 :( – iProgrammer 2011-05-25 10:30:31

0

因爲你是我面臨同樣的問題,

和錯誤日誌中我得到的是「本地文件夾不存在」,即使我已經被自己創建的文件夾

我認爲, 「DBRestClient」只是「單個文件」下載器?

「NOT」 的文件夾同步對象

現在

我試圖使用同步API同步的目標文件夾

同步API地址....

https://www.dropbox.com/developers/sync/start/ios


想着這個......如果「DBRestClient」可以下載整個文件夾文件....

同步API是沒用的....如果你使用像

[_restClient loadMetadata:@"/"]; 

喝彩!

相關問題