MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / markDone

Function markDone

wasm/reset_events.js:149–161  ·  view source on GitHub ↗
(fullpath, recursive)

Source from the content-addressed store, hash-verified

147 if (typeof DataTransferItem.prototype.webkitGetAsEntry !== "undefined") {
148 let entriesTree = {};
149 var markDone = function (fullpath, recursive) {
150 if (entriesTree[fullpath].subpaths.length != 0) return;
151 delete entriesTree[fullpath];
152 let parentpath = fullpath.substring(0, fullpath.lastIndexOf('/'));
153 if (!entriesTree.hasOwnProperty(parentpath)) {
154 if (Object.keys(entriesTree).length == 0) finalize();
155 return;
156 }
157 const fpIndex = entriesTree[parentpath].subpaths.indexOf(fullpath);
158 if (fpIndex > -1) entriesTree[parentpath].subpaths.splice(fpIndex, 1);
159 if (recursive) markDone(parentpath, true);
160 if (Object.keys(entriesTree).length == 0) finalize();
161 };
162 var processEntry = function (entry) {
163 let fp = entry.fullPath;
164 let pp = fp.substring(0, fp.lastIndexOf('/'));

Callers 2

processEntryFunction · 0.85
rReadFunction · 0.85

Calls 2

finalizeFunction · 0.85
spliceMethod · 0.45

Tested by

no test coverage detected