(dirRoot: string)
| 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)) { |
nothing calls this directly
no test coverage detected