MCPcopy
hub / github.com/mixedbread-ai/mgrep / getFiles

Method getFiles

src/lib/file.ts:105–114  ·  view source on GitHub ↗
(dirRoot: string)

Source from the content-addressed store, hash-verified

103 }
104
105 *getFiles(dirRoot: string): Generator<string> {
106 // Preload root .mgrepignore to ensure it's cached
107 this.getDirectoryIgnoreFilter(dirRoot);
108
109 if (this.git.isGitRepository(dirRoot)) {
110 yield* this.git.getGitFiles(dirRoot);
111 } else {
112 yield* this.getAllFilesRecursive(dirRoot, dirRoot);
113 }
114 }
115
116 private getDirectoryIgnoreFilter(dir: string): ReturnType<typeof ignore> {
117 if (this.ignoreCache.has(dir)) {

Callers

nothing calls this directly

Calls 4

getAllFilesRecursiveMethod · 0.95
isGitRepositoryMethod · 0.65
getGitFilesMethod · 0.65

Tested by

no test coverage detected