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

Function readFileSha256

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

Source from the content-addressed store, hash-verified

171}
172
173function readFileSha256(path: string): string | null {
174 try {
175 return sha256(readFileSync(path));
176 } catch {
177 return null;
178 }
179}
180
181function ensureFile(path: string, bytes: Buffer, expectedSha256: string, mode?: number): void {
182 if (readFileSha256(path) === expectedSha256) return;

Callers 1

ensureFileFunction · 0.70

Calls 1

sha256Function · 0.70

Tested by

no test coverage detected