MCPcopy Create free account
hub / github.com/callstack/agent-device / computeFileHash

Function computeFileHash

src/daemon/resumable-upload.ts:271–280  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

269}
270
271async function computeFileHash(filePath: string): Promise<string> {
272 const hash = crypto.createHash(RESUMABLE_UPLOAD_HASH_ALGORITHM);
273 await pipeline(fs.createReadStream(filePath), async function* (source) {
274 for await (const chunk of source) {
275 hash.update(chunk);
276 yield chunk;
277 }
278 });
279 return hash.digest('hex');
280}

Callers 1

finalizeResumableUploadFunction · 0.70

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…