2014-01-15 57 views
0

我正在使用mergext dropboxsync同步我的數據從ipad。我的問題是 。 我們如何從特殊文件夾specialfolderpath 中獲取文件以及如何檢查文件是否存在於保管箱中。 我沒有使用領域的文件夾或文件,我想程序被隱藏從用戶 得到我的文件夾和路徑我使用簡單的波紋管代碼。livecode和mergext dropbox同步

put specialfolderpath("documents") & "/myfile.sqlite" into myPath 

,這裏是從按鈕的代碼我使用

on mouseUp 
    goToParent --<command 
    repeat for each line tempitem in fld "sFolders" --<hide field 
    add 1 to t 
if tempitem ="hairaid-backup" then 
    put 1 into fExist 
end if 
end repeat 
--!! if folder exist 
if fExist is a number then 
else 
    try 
    mergDropboxCreateFolder (hairaid &"-"&backup) 
catch e 
answer e 
end try 
end if 
end mouseUp 

回答

1

我不會真的建議在同步Dropbox的SQLite數據庫。您可能會創建一個更好的結果,爲Dropbox進行文件同步,因爲一個大文件可能最終會發生衝突版本。

然而,回答你的問題在一般意義上,你需要做這樣的事情:

put url ("binfile:"&myPath) into myData 
mergDropboxWriteFile relativePath,myData 

然後讓你的數據:

put merDropboxGetFile(relativePath) into myData 
+0

的應用程序,我使用的,只有一個文件是需要同步的.sqlite文件,因此最終用戶不會丟失數據,最終用戶需要的文檔文件夾中沒有其他內容。從另一端我看到MergdropBox具有修訂版,可能在應用程序中同步和簡單?問題的答案是工作thx。 – johnnyB