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

Function sourceOf

src/bin/codegraph.ts:2982–2987  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

2980 // module, which only its file shows; read each file once.
2981 const sources = new Map<string, string | undefined>();
2982 const sourceOf = (filePath: string): string | undefined => {
2983 if (!sources.has(filePath)) {
2984 try { sources.set(filePath, fs.readFileSync(path.join(projectPath, filePath), 'utf-8')); } catch { sources.set(filePath, undefined); }
2985 }
2986 return sources.get(filePath);
2987 };
2988 const collected = groups.map((group) => {
2989 const focus = group[0]!;
2990 const hierarchy = buildTypeHierarchy(cg, focus, { overrides: false });

Callers

nothing calls this directly

Calls 4

hasMethod · 0.80
getMethod · 0.65
setMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected