大佬教程收集整理的这篇文章主要介绍了Cordova android无法从缓存目录中复制图像,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
问候
function copiePhoto() { try { var fail = function (err) { alert(err); }; window.resolveLocalFileSystemURI("file:///storage/emulated/0/Android/data/com.coolappz.capigo/cache/1427968060754.jpg",function (filE) { window.resolveLocalFileSystemURI("file:///test",function (desTination) { file.moveTo(desTination,"test.jpg"); },fail); },fail); } catch (err) { alert("copie : " + err); }
}
function recupImage(imageURI) { window.resolveLocalFileSystemURI(imageURI,copiePhoto,fail); } function copiePhoto(fileEntry) { window.requestFileSystem(LocalFileSystem.PERSISTENT,function(filesys) { fileSys.root.getDirectory("photos2",{Create: true,exclusive: falsE},function(dir) { fileEntry.copyTo(dir,fileEntry.name,onCopysuccess,fail); },fail); },fail); } function onCopysuccess(entry) { alert('image copié dans le chemin : ' + entry.fullPath); } function fail(error) { alert(error.codE); }
以上是大佬教程为你收集整理的Cordova android无法从缓存目录中复制图像全部内容,希望文章能够帮你解决Cordova android无法从缓存目录中复制图像所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。