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

Function main

benchmark/fs/bench-readdir.js:13–24  ·  view source on GitHub ↗
({ n, dir, withFileTypes })

Source from the content-addressed store, hash-verified

11});
12
13function main({ n, dir, withFileTypes }) {
14 withFileTypes = withFileTypes === 'true';
15 const fullPath = path.resolve(__dirname, '../../', dir);
16 bench.start();
17 (function r(cntr) {
18 if (cntr-- <= 0)
19 return bench.end(n);
20 fs.readdir(fullPath, { withFileTypes }, () => {
21 r(cntr);
22 });
23 }(n));
24}

Callers

nothing calls this directly

Calls 5

rFunction · 0.50
resolveMethod · 0.45
startMethod · 0.45
endMethod · 0.45
readdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…