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

Method scanFile

src/resolution/index.ts:962–969  ·  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

960
961 /** The text a walk over the indexed files reads: see ResolutionContext.scanFile. */
962 private scanFile(filePath: string): string | null {
963 if (this.fileCache.has(filePath)) return this.fileCache.get(filePath) ?? null;
964 try {
965 return readSourceText(path.join(this.projectRoot, filePath), 'latin1');
966 } catch {
967 return null;
968 }
969 }
970
971 /**
972 * 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