我想从
移动文件夹file:///storage/emulated/0/sync//
到Android应用程序沙箱
file:///data/data/de.tara.SyncMobile/files/files/sync//
为此,我写了一个函数。我用这个链接的帮助:
https://www.w3.org/TR/2012/WD-file-system-api-20120417/
https://www.html5rocks.com/de/tutorials/file/filesystem/
这是我的代码:
window.requestFileSystem(LocalFileSystem.PERSISTENT,0,requestFileSystemSuccess,requestFileSystemError);
function requestFileSystemSuccess(fs)
{
console.log("Master.js:requestFileSystemSuccess");
var syncDir = fs.root.getDirectory("sync",{});
var syncSandboxDir = fs.root.getDirectory("",{});
//how i can move the sync directory to the sanbox path????
}