MCPcopy Index your code
hub / github.com/nodejs/node / collectEntries

Function collectEntries

test/common/fs.js:35–43  ·  view source on GitHub ↗
(dir, dirEntries)

Source from the content-addressed store, hash-verified

33}
34
35function collectEntries(dir, dirEntries) {
36 const newEntries = readdirSync(dir, mustNotMutateObjectDeep({ withFileTypes: true }));
37 for (const entry of newEntries) {
38 if (entry.isDirectory()) {
39 collectEntries(join(dir, entry.name), dirEntries);
40 }
41 }
42 dirEntries.push(...newEntries);
43}
44
45module.exports = {
46 nextdir,

Calls 5

mustNotMutateObjectDeepFunction · 0.85
readdirSyncFunction · 0.50
joinFunction · 0.50
isDirectoryMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…