1 Reply Latest reply on Feb 11, 2017 5:41 AM by ahmadalattar

    cordova plugin file : file handling and validation problem

    ahmadalattar

      hello ,

       

      because there is no rich source for cordova plugins , i know my code is kind of funny , and maybe am wrong in the javascript normally.

      but is my code is currect ?

       

      if the file exists : yes

      if not : no

       

      function isThere(seek) {

        window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fs) {

        fs.root.getFile(seek, null, function (f) {

        if (f.isFile === true) {alert("YES :" + f.name);}

        else {alert("NO"); }

        

         },null);

        },null);

        }