MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / saveFileHashCache

Function saveFileHashCache

src/scanner.ts:110–116  ·  view source on GitHub ↗
(outputDir: string, cache: FileHashCache)

Source from the content-addressed store, hash-verified

108}
109
110export async function saveFileHashCache(outputDir: string, cache: FileHashCache): Promise<void> {
111 try {
112 await writeFile(join(outputDir, "cache.json"), JSON.stringify(cache, null, 2));
113 } catch {
114 // Non-fatal — cache is a perf optimization only
115 }
116}
117
118export function hashFileContent(content: string): string {
119 return createHash("sha1").update(content).digest("hex").slice(0, 12);

Callers

nothing calls this directly

Calls 1

joinFunction · 0.85

Tested by

no test coverage detected