MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / hashFiles

Function hashFiles

scripts/codex-worktree-cache.mjs:296–305  ·  view source on GitHub ↗
(paths)

Source from the content-addressed store, hash-verified

294}
295
296function hashFiles(paths) {
297 const hash = createHash("sha256");
298 for (const path of paths) {
299 hash.update(path);
300 hash.update("\0");
301 hash.update(readFileSync(join(ROOT, path)));
302 hash.update("\0");
303 }
304 return hash.digest("hex").slice(0, 16);
305}
306
307function hashPath(path) {
308 return createHash("sha256").update(readFileSync(path)).digest("hex");

Callers 1

buildEntriesFunction · 0.85

Calls 1

updateMethod · 0.65

Tested by

no test coverage detected