title: ios Listing all files in a directory phonegap 3.4.0
body: <p>Hello Im developing an ios application using phonegap but Im having hard times accessing files as follow:</p>
  
  <p>receivedEvent: function(id) {
      function errorHandler(error)
      {
          alert(error.code);
      }
      function toArray(list) {
          return Array.prototype.slice.call(list || [], 0);
      }
      window.requestFileSystem(window.PERSISTENT,1024*1024,go, errorHandler);</p>
  
  <pre><code>function go(fs) {
  
  
  fs.root.getDirectory("/", {},
  
                       function(dirEntry)
                       {
  
              var dirReader = dirEntry.createReader();
  
  
  
                       var entries = [];
  
  
     var readEntries = function() {
      dirReader.readEntries (
               function(results) {
          if (!results.length) {
  
                             }
                             else {
                      entries = entries.concat(toArray(results));
                             for(var i=0;i &lt; results.length;i++)
                             {
              alert(results[i].fullPath); 
      console.log(results[i].toURL());
  
  
                             }
                                  readEntries();
                             }
                             }, errorHandler);
                       };
                       readEntries(); // Start reading dirs.
                }
                       , errorHandler);
  }
  </code></pre>
  
  <p>}
  }</p>
  
  <p>when I enter fs.root.getDirectory("/"...
  the result of  alert(results[i].fullPath); is:
  /Documents/, /www/, /imgs/(???? that is so strange as imgs is inside www in my workspace why is it appearing in the root folder ), /cocloud/
  if i replace "/" with "/www/" or anything els I dont get any results?! therefore I get list of directories or files in my project ;(
  also if I put any folder or file in the Staging directory which I understand is the root or resource directory it dose not  appear 
  even if I use "/" for search query example: fs.root.getDirectory("/"...etc ??  can some one help pleas How can I list all files inside some folder in ios knowing that I added those files manualy to the project www/imgs folder. Cane some one help me pleas?!</p>