getDirList(){ plus.io.resolveLocalFileSystemURL( "/sdcard/Record/Call", //指定的目录 function(entry) { var directoryReader = entry.createReader(); //获取读取目录对象 directoryReader.readEntries( function(entries) { //历遍子目录即可 for (var i = 0; i < entries.length; i++) { console.log("文件信息:" + entries[i].name); } }, function(err) { console.log("访问目录失败"); }); }, function(err) { console.log("访问指定目录失败:" + err.message); }); },
摘自:https://blog.csdn.net/Lpandeng/article/details/109640185