MCPcopy Index your code
hub / github.com/tinyplex/tinybase / forEachDirAndFile

Function forEachDirAndFile

test/unit/documentation.test.ts:232–245  ·  view source on GitHub ↗
(
  dir: string,
  dirCallback: ((dir: string) => void) | null,
  fileCallback?: (file: string) => void,
  extension = '',
)

Source from the content-addressed store, hash-verified

230 );
231
232const forEachDirAndFile = (
233 dir: string,
234 dirCallback: ((dir: string) => void) | null,
235 fileCallback?: (file: string) => void,
236 extension = '',
237): void =>
238 readdirSync(dir, {withFileTypes: true}).forEach((entry) => {
239 const path = resolve(join(dir, entry.name));
240 if (entry.isDirectory()) {
241 dirCallback?.(path);
242 } else if (path.endsWith(extension)) {
243 fileCallback?.(path);
244 }
245 });
246
247const getRunnableImport = (
248 _: string,

Callers 1

forEachDeepFileFunction · 0.70

Calls 1

joinFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…