title: Phonegap Cordova Delete File (android)
body: <p>Helo..</p>
  
  <p>I'm new in phonegap..</p>
  
  <p>I had a problem to delete file in android phonegap 3.4</p>
  
  <pre><code>console.log(photo);    
  
  window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
    function onFileSystemSuccess(fileSystem) {
      fileSystem.root.getFile(
        photo, {create: false},
        function gotFileEntry(fileEntry) {
          fileEntry.remove();
        },
        onError);
    },
    onError);
  </code></pre>
  
  <p>Log Result</p>
  
  <p>04-24 16:29:54.234: I/Web Console(16213): file:///storage/sdcard0/DCIM/Camera/1398331773136.jpg</p>
  
  <p>04-24 16:49:01.989: W/System.err(18864): org.apache.cordova.file.EncodingException: This path has an invalid ":" in it.</p>
  
  <p>04-24 16:49:01.994: W/System.err(18864): at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:159)</p>
  
  <p>04-24 16:49:01.994: W/System.err(18864): at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:698)</p>
  
  <p>04-24 16:49:03.664: I/Web Console(18864): 5</p>
  
  <p>after search, i got this (List of Error Codes and Meanings) in doc</p>
  
  <p>5 = ENCODING_ERR</p>
  
  <p>is file path is wrong and how to get valid path to file in sdcard ?</p>
  
  <p>Thanks</p>