(rootPath: string = process.cwd())
| 183 | } |
| 184 | |
| 185 | public startWatching(rootPath: string = process.cwd()): void { |
| 186 | this.stopWatching(); |
| 187 | this.isInitializing = true; |
| 188 | this.watchDirectory(rootPath); |
| 189 | |
| 190 | // Allow a small delay for initial file system events to settle |
| 191 | // before enabling callbacks |
| 192 | setTimeout(() => { |
| 193 | this.isInitializing = false; |
| 194 | }, 50); |
| 195 | } |
| 196 | |
| 197 | public stopWatching(): void { |
| 198 | this.isInitializing = false; |
no test coverage detected