cordova - how to check file is exist or not in mobile sd card using javascript -


how check if excel file (.xlsx) exists on sd card on android using phonegap? if file exits, how import , export file contents through javascript?

first add cordova file plugin project.then use following code :

    var reader = new filereader();     var filesource = <file path>;      reader.onloadend = function(evt) {          if(evt.target.result != null) {             // if receive not null value file exists         } else {             // otherwise file doesn't exists         }              };      // going check if file exists     reader.readasdataurl(filesource);    

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -