in src/windows/FileProxy.js [953:983]
getFolderFromPathAsync(fullPath).done(function (storageFolder) {
const promiseArr = [];
let index = 0;
promiseArr[index++] = storageFolder.getFilesAsync().then(function (fileList) {
if (fileList !== null) {
for (let i = 0; i < fileList.length; i++) {
const fspath = getFsPathForWinPath(fs, fileList[i].path);
if (!fspath) {
fail(FileError.NOT_FOUND_ERR);
return;
}
result.push(new FileEntry(fileList[i].name, fspath, fs.name, fs.makeNativeURL(fspath)));
}
}
});
promiseArr[index++] = storageFolder.getFoldersAsync().then(function (folderList) {
if (folderList !== null) {
for (let j = 0; j < folderList.length; j++) {
const fspath = getFsPathForWinPath(fs, folderList[j].path);
if (!fspath) {
fail(FileError.NOT_FOUND_ERR);
return;
}
result.push(new DirectoryEntry(folderList[j].name, fspath, fs.name, fs.makeNativeURL(fspath)));
}
}
});
WinJS.Promise.join(promiseArr).then(function () {
win(result);
});
}, function () { fail(FileError.NOT_FOUND_ERR); });