2014-12-15 3 views

답변

0
var captureSuccess = function (mediaFiles) { 
    // SystemURI require string and path2 will deal it and must not use file:/(path) 
    var path = mediaFiles[0].fullPath; 
    var path2 = path.slice(0, 5) + "//" + path.slice(5); 
    window.resolveLocalFileSystemURI(path2, successMoveTo, fail); 
} 

function successMoveTo(entry) { 
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, 
     function (fileSys) { 
      fileSys.root.getDirectory(folder, {create: true, exclusive: false}, 
      function (directory) { 
       entry.moveTo(directory, file, 
        success, fail); 
     }, fail); 
    }, fail); 
}