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

Method maybeScheduleForRemovedDir

src/sync/watcher.ts:657–669  ·  view source on GitHub ↗

* A deleted DIRECTORY arrives as one event on the directory's own path — * no source extension, so the source-file filter drops it, and the files * underneath may never get events of their own (Windows's recursive * watcher reports only the top-most removed entry; macOS FSEvents can * co

(rel: string)

Source from the content-addressed store, hash-verified

655 * costs at most one no-op scan-diff, absorbed by the debounce.
656 */
657 private maybeScheduleForRemovedDir(rel: string): void {
658 try {
659 fs.statSync(path.join(this.projectRoot, rel));
660 return; // still on disk — an ordinary non-source change, ignore
661 } catch {
662 /* gone — fall through */
663 }
664 logDebug('Non-source path removed; scheduling sync for possible directory removal', {
665 path: rel,
666 });
667 this.needsFullScan = true;
668 this.scheduleSync();
669 }
670
671 /** Close and forget the watch for a directory that errored/was removed. */
672 private unwatchDir(dir: string): void {

Callers 1

handleChangeMethod · 0.95

Calls 3

scheduleSyncMethod · 0.95
logDebugFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected