MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / readFileSha256

Function readFileSha256

apps/kimi-code/src/native/web-assets.ts:70–76  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

68}
69
70function readFileSha256(path: string): string | null {
71 try {
72 return sha256(readFileSync(path));
73 } catch {
74 return null;
75 }
76}
77
78function ensureFile(path: string, bytes: Buffer, expectedSha256: string): void {
79 if (readFileSha256(path) === expectedSha256) return;

Callers 1

ensureFileFunction · 0.70

Calls 1

sha256Function · 0.70

Tested by

no test coverage detected