MCPcopy Create free account
hub / github.com/jetkvm/kvm / computeFileHash

Function computeFileHash

ui/e2e/helpers.ts:1227–1235  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

1225// ── OTA: Utilities ──
1226
1227export async function computeFileHash(filePath: string): Promise<string> {
1228 return new Promise((resolve, reject) => {
1229 const hash = crypto.createHash("sha256");
1230 const stream = fs.createReadStream(filePath);
1231 stream.on("data", data => hash.update(data));
1232 stream.on("end", () => resolve(hash.digest("hex")));
1233 stream.on("error", reject);
1234 });
1235}
1236
1237export function getLocalNetworkIP(): string {
1238 try {

Callers 1

createMockUpdateServerFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected