(fullpath, recursive)
| 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('/')); |
no test coverage detected