我想将 sqlite db 复制到数据库文件夹,但不知道如何使用 copyto api:
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);
}
什么是入口?我必须在哪里写我的数据库路径表单资产文件夹?在最后一行它说成功但没有定义它是不是输入错误?我必须改写win吗?