MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / reportTraversedFile

Function reportTraversedFile

scan-worker.js:233–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231 const SCAN_FLUSH_BATCH = 400;
232
233 const flushDiscoveredFiles = (force = false) => {
234 while (files.length >= SCAN_FLUSH_BATCH || (force && files.length > 0)) {
235 const chunk = files.splice(0, Math.min(SCAN_FLUSH_BATCH, files.length));
236 parentPort.postMessage({ type: 'batch', files: chunk });
237 }
238 };
239
240 const shouldQueueFile = (fileName) => {
241 // Skip Printventory zip-extract temps if they somehow land under a scanned tree
242 if (typeof fileName === 'string' && fileName.startsWith('printventory_')) return false;
243 const ext = path.extname(fileName).toLowerCase();
244 if (extSet.has(ext)) return true;

Callers 1

processDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected