MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / processEntry

Function processEntry

src/lib/libglfw.js:902–922  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

900 if (Object.keys(entriesTree).length == 0) finalize();
901 }
902 function processEntry(entry) {
903 let fp = entry.fullPath;
904 let pp = fp.substring(0, fp.lastIndexOf('/'));
905 entriesTree[fp] = { subpaths: [] };
906 if (entry.isFile) {
907 entry.file((f) => { filesQ.push({ file: f, path: pp }); markDone(fp, false); })
908 } else if (entry.isDirectory) {
909 if (entriesTree.hasOwnProperty(pp)) entriesTree[pp].subpaths.push(fp);
910 FS.createPath("/" + drop_dir + pp, entry.name);
911 var reader = entry.createReader();
912 var rRead = function (dirEntries) {
913 if (dirEntries.length == 0) {
914 markDone(fp, true);
915 return;
916 }
917 for (const ent of dirEntries) processEntry(ent);
918 reader.readEntries(rRead);
919 };
920 reader.readEntries(rRead);
921 }
922 }
923 for (const item of event.dataTransfer.items) {
924 processEntry(item.webkitGetAsEntry());
925 }

Callers 2

rReadFunction · 0.85
libglfw.jsFile · 0.85

Calls 2

markDoneFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected