UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 613 B
import{n as e}from"./openclaw-state-read-file-hash-CLLsXIlO.mjs";import t from"node:fs";import"node:path";function sameFileMutationFingerprint(e,t){return e.birthtimeNs===t.birthtimeNs&&e.ctimeNs===t.ctimeNs&&e.dev===t.dev&&e.ino===t.ino&&e.mtimeNs===t.mtimeNs&&e.size===t.size}function hashFileDescriptorSync(t,n){let{digest:r,bytes:i}=e(t,{maxBytes:n});return{sha256:r,sizeBytes:i}}function flushAndHashFileSync(e){let n=t.openSync(e,`r+`);try{return t.fsyncSync(n),hashFileDescriptorSync(n)}finally{t.closeSync(n)}}export{hashFileDescriptorSync as n,sameFileMutationFingerprint as r,flushAndHashFileSync as t};