[Cordova] Deplacement de fichier

Par leboosbart88, il y a 11 ans


Javascript NodeJS

Bonjour,

J'essaye de deplacer un fichier qui se trouve sur la memoire du telephone avec apache cordova.
J'utilise donc la fonction moveTo.

Voici mon script : Mais sa ne marche pas, voyez vous une erreur ?

function success(entry) { alert("New Path: " + entry.fullPath); } function fail(error) { alert(error.code); } function moveDirectory(entry) { var parent = "/storage/emulated/0/Music"; alert(parent); var newName = "move_test.pdf"; alert(newName); var parentEntry = new DirectoryEntry({fullPath: parent}); alert(parentEntry); // move the directory to a new directory and rename it entry.moveTo(parentEntry, newName, success, fail); } moveDirectory("/storage/emulated/0/Download/Tuto1.pdf");

1 réponse

leboosbart88, il y a 11 ans

Erreur de ma part, sujet non résolu !