MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / walkSync

Function walkSync

updateCompletionTable.js:50–59  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

48 .map((dirent) => dirent.name);
49
50function* walkSync(dir) {
51 const files = fs.readdirSync(dir, { withFileTypes: true });
52 for (const file of files) {
53 if (file.isDirectory()) {
54 yield* walkSync(path.join(dir, file.name));
55 } else {
56 yield path.join(dir, file.name);
57 }
58 }
59}
60
61function nestedFiles(dir) {
62 files = [];

Callers 1

nestedFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected