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

Method scanFile

src/resolution/index.ts:864–871  ·  view source on GitHub ↗

The text a walk over the indexed files reads: see ResolutionContext.scanFile.

(filePath: string)

Source from the content-addressed store, hash-verified

862
863 /** The text a walk over the indexed files reads: see ResolutionContext.scanFile. */
864 private scanFile(filePath: string): string | null {
865 if (this.fileCache.has(filePath)) return this.fileCache.get(filePath) ?? null;
866 try {
867 return readSourceText(path.join(this.projectRoot, filePath), 'latin1');
868 } catch {
869 return null;
870 }
871 }
872
873 /**
874 * Create the resolution context

Callers 1

createContextMethod · 0.95

Calls 4

readSourceTextFunction · 0.90
hasMethod · 0.80
getMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected