MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pathMatchesDigest

Function pathMatchesDigest

pkg/npm/install.js:490–498  ·  view source on GitHub ↗
(candidatePath, expectedDigest)

Source from the content-addressed store, hash-verified

488}
489
490function pathMatchesDigest(candidatePath, expectedDigest) {
491 try {
492 const status = fs.lstatSync(candidatePath);
493 return status.isFile() && !status.isSymbolicLink() &&
494 fileSha256(candidatePath) === expectedDigest;
495 } catch (_) {
496 return false;
497 }
498}
499
500function removeOwnedPublishedBinary(destDir, publishedDigests) {
501 for (const name of [WINDOWS_BINARY_NAME]) {

Callers 1

Calls 1

fileSha256Function · 0.85

Tested by

no test coverage detected