MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / shouldIgnoreDir

Method shouldIgnoreDir

src/sync/watcher.ts:583–589  ·  view source on GitHub ↗

* True for any directory that should NOT be watched (used while building the * Linux per-directory watch tree). Tests the directory form of the path so a * dir-only ignore rule like `build/` matches.

(dirPath: string)

Source from the content-addressed store, hash-verified

581 * dir-only ignore rule like `build/` matches.
582 */
583 private shouldIgnoreDir(dirPath: string): boolean {
584 const rel = normalizePath(path.relative(this.projectRoot, dirPath));
585 if (!rel || rel === '.' || rel.startsWith('..')) return false; // root / outside
586 if (this.isAlwaysIgnored(rel)) return true;
587 if (!this.ignoreMatcher) return false;
588 return this.ignoreMatcher.ignores(rel + '/');
589 }
590
591 /**
592 * Permanently disable live watching after a terminal runtime failure

Callers 2

watchTreeMethod · 0.95
handleDirEventMethod · 0.95

Calls 3

isAlwaysIgnoredMethod · 0.95
normalizePathFunction · 0.90
ignoresMethod · 0.80

Tested by

no test coverage detected