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

Function isFileCached

tests/snippet-validation.test.cjs:103–113  ·  view source on GitHub ↗
(filePath, cache)

Source from the content-addressed store, hash-verified

101}
102
103function isFileCached(filePath, cache) {
104 if (testAll) return false; // --all flag bypasses cache
105 if (specificFile) return false; // Testing specific file bypasses cache
106
107 const relativePath = path.relative(DOCS_BASE_DIR, filePath);
108 const currentHash = getFileHash(filePath);
109
110 return cache[relativePath] &&
111 cache[relativePath].hash === currentHash &&
112 cache[relativePath].passed === true;
113}
114
115/**
116 * Extract code blocks from markdown/mdx files

Callers 1

runTestsFunction · 0.85

Calls 1

getFileHashFunction · 0.85

Tested by

no test coverage detected