Update: Works on iOS too.

Try:

function checkIfFileExists(path){
// path is the full absolute path to the file.
window.resolveLocalFileSystemURL(path, fileExists, fileDoesNotExist);
}
function fileExists(fileEntry){
alert(«File « + fileEntry.fullPath + » exists!»);
}
function fileDoesNotExist(){
alert(«file does not exist»);
}

Found the solution here.

Works on Android. Will test on iOS and update this answer.

Continua leyendo «Cordova check if file in url exists»

Entradas relacionadas

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *