MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getFileHash

Function getFileHash

tests/snippet-validation.test.cjs:98–101  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

96}
97
98function getFileHash(filePath) {
99 const content = fs.readFileSync(filePath, 'utf8');
100 return crypto.createHash('md5').update(content).digest('hex');
101}
102
103function isFileCached(filePath, cache) {
104 if (testAll) return false; // --all flag bypasses cache

Callers 2

isFileCachedFunction · 0.85
runTestsFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected