我想一個SQLite數據庫複製到數據庫文件夾,但不知道如何CopyTo從API的使用:如何使用CopyTo從API中的PhoneGap
function win(entry) {
console.log("New Path: " + entry.fullPath);
}
function fail(error) {
alert(error.code);
}
function copyFile(entry) {
var parent = document.getElementById('parent').value,
parentEntry = new DirectoryEntry({fullPath: parent});
// copy the file to a new directory and rename it
entry.copyTo(parentEntry, "file.copy", success, fail);
}
是什麼項目嗎?在哪裏我必須寫我的數據庫路徑表單資產文件夾?是否有人認爲在最後一行說成功但沒有定義它?我必須寫勝利嗎?
謝謝西蒙 我想創造一個SQLite數據庫,並把它複製到數據庫forlder在第一次運行。所以我看到唯一的辦法是在應用程序的第一次運行中將xml或其他類型的數據庫(如lawnchair)導入到sqlite中。我對嗎? – 2011-12-15 18:58:48
有什麼方法可以在phonegap中使用預先存儲的數據庫嗎? – 2011-12-15 19:09:18