Function
main
({ n, dir, withFileTypes })
Source from the content-addressed store, hash-verified
| 11 | }); |
| 12 | |
| 13 | function 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
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…