function success(entries) { var i; for (i=0; i<entries.length; i++) { console.log('En - ', entries[i]); } } function fail(error) { console.log("Failed to list directory contents: ", error); } // output in android: file:///storage/emulated/0/Sounds var directory_path = cordova.file.externalRootDirectory+"Sounds"; window.resolveLocalFileSystemURL(directory_path , function(dirEntry) { var directoryReader = dirEntry.createReader(); console.log(dirEntry); // Get a list of all the entries in the directory directoryReader.readEntries(success,fail); });
Tested in Android.
Click here for more details.
Another link Mobile File Explorer with PhoneGap/Cordova has examples.