* macOS/Windows: one root stream, supplemented for directory symlinks. * `filename` arrives relative to the project root (with subdirectories), so * it maps straight to a project-relative path.
()
| 485 | * it maps straight to a project-relative path. |
| 486 | */ |
| 487 | private startRecursive(): void { |
| 488 | this.recursiveWatcher = watchImpl( |
| 489 | this.projectRoot, |
| 490 | { recursive: true, persistent: true }, |
| 491 | (_event, filename) => this.handleDirEvent(this.projectRoot, filename) |
| 492 | ); |
| 493 | this.recursiveWatcher.on('error', (err: unknown) => { |
| 494 | if (isWatchResourceExhaustion(err)) { |
| 495 | this.degrade(EXHAUSTION_REASON, { error: String(err) }); |
| 496 | return; |
| 497 | } |
| 498 | logWarn('File watcher error', { error: String(err) }); |
| 499 | }); |
| 500 | this.refreshWatchTree(); |
| 501 | } |
| 502 | |
| 503 | /** Reconcile logical directory paths with real targets, including retargeted links. */ |
| 504 | private refreshWatchTree(): void { |
no test coverage detected