Assuming that you are actually using Cordoba, check out FileEntry , which has methods called moveToand copyTo.
Keep in mind that the file systems API is a callback addon.
One quick example from non-documented documentation:
var fail = function(err) { console.log(err) }
window.resolveLocalFileSystemURI("file:///example.txt", function(file) {
window.resolveLocalFileSystemURI("file:///directory-to-move-to", function(destination) {
file.moveTo(destination,"example.txt");
},fail)
},fail);
I skipped error handling functions for clarity, suppose it works without it.
source
share