title: Cordova 3+ find all music files on device
body: <p>I am trying to learn Cordova, using visual studio as my ide. I've followed some instructions online to build a music player, but one plugin is missing... "Storage".</p>
  
  <p>I tried running it anyway but I get 'error 5' when trying to use directoryReader.</p>
  
  <p>I'm assuming this is due to a permission issue which again I assume would be sorted by the storage plugin.</p>
  
  <p>A couple of questions here... </p>
  
  <p>Are my above assumptions correct?
  Where can I find the Storage Plugin?
  How would I include the Plugin?</p>
  
  <p>Thanks in advance for any advice.</p>
  
  <p><em>(I know I should post code but I'm not home now and this is driving me mad thinking about it!)</em></p>
  
  <p>Here's a sample of code I'm using:</p>
  
  <pre><code>document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false );
  function onDeviceReady() {
      // Handle the Cordova pause and resume events
      document.addEventListener( 'pause', onPause.bind( this ), false );
      document.addEventListener( 'resume', onResume.bind( this ), false );
      $('#readMusic').click(function () { readMusic(); });
  };
  function readMusic() {
      window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
  }
  function onFileSystemSuccess(fileSystem) {
      var directoryReader = fileSystem.root.createReader();
      directoryReader.readEntries(readerSuccess, fail);
  }
  function readerSuccess(entries) {
      var i;
      for (i = 0; i &lt; entries.length; i++) {
          if (entries[i].name.indexOf('.mp3') &gt; -1) {
              alert(entries[i].name);
          }
      }
  }
  </code></pre>