MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / startRecursive

Method startRecursive

src/sync/watcher.ts:487–501  ·  view source on GitHub ↗

* 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.

()

Source from the content-addressed store, hash-verified

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 {

Callers 1

startMethod · 0.95

Calls 6

handleDirEventMethod · 0.95
degradeMethod · 0.95
refreshWatchTreeMethod · 0.95
logWarnFunction · 0.90
onMethod · 0.65

Tested by

no test coverage detected