MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / isFileUsedAsProject

Method isFileUsedAsProject

src/utils/DependencyCache.ts:674–687  ·  view source on GitHub ↗

* Check if a file is used as a project

(filePath: string)

Source from the content-addressed store, hash-verified

672 * Check if a file is used as a project
673 */
674 isFileUsedAsProject(filePath: string): boolean {
675 if (!this.indexesBuilt) {
676 tasknotesLogger.warn(
677 "DependencyCache: isFileUsedAsProject called before indexes built, building now...",
678 {
679 category: "stale-data",
680 operation:
681 "dependencycache-isfileusedasproject-called-indexes-built-building-now",
682 }
683 );
684 this.buildIndexesSync();
685 }
686 return this.projectReferences.has(filePath);
687 }
688
689 /**
690 * Build indexes synchronously (for lazy initialization)

Callers

nothing calls this directly

Calls 3

buildIndexesSyncMethod · 0.95
warnMethod · 0.80
hasMethod · 0.80

Tested by

no test coverage detected