ReadonlypayloadPayload f64 value (slot 0) read from disk. 0 when status is 'missing'.
ReadonlypayloadPayload f64 value (slot 1) read from disk. 0 when status is 'missing'.
ReadonlypayloadPayload f64 value (slot 2) read from disk. 0 when status is 'missing'.
ReadonlypayloadPayload f64 value (slot 3) read from disk. 0 when status is 'missing'.
ReadonlyrootRoot path that was active when this session was opened.
ReadonlystatusCache status determined at open time.
ReadonlyversionCache version (u32) that was active when this session was opened.
The parent FileHashCache that created this session.
LZ4-compressed opaque binary payloads read from disk. Empty array if none. Lazily decoded, zero-copy.
true if the cache configuration (files, version, fingerprint) was modified
since this session was opened (via setters or FileHashCache.configure).
Number of tracked files (from disk, or from the constructor when status is 'missing').
File list as absolute paths. When status is 'missing', reflects the files
passed to the constructor. Lazily decoded from the on-disk representation.
true if the session holds the lock and the status indicates a write is needed.
Uncompressed opaque binary payloads read from disk — stored raw directly after the header and readable without decompressing the body. Empty array if none. Lazily decoded, zero-copy.
Check if a write is needed — either because the cache status indicates changes on disk, or because the cache configuration was modified since this session was opened.
Equivalent to session.status !== 'upToDate' || session.configChanged.
Disposable — using session = await cache.open() calls close.
Resolve all file entries — complete stat + hash for every tracked file.
After open(), some entries may be only partially resolved (CacheOpen exits
early on the first change). This method completes stat + hash for ALL files,
then returns a FileHashCacheEntries snapshot with per-file metadata.
Can be called before write(). The resolved data is reused by write.
Cannot be called after write() or close().
Returns cached result on subsequent calls.
Optionalsignal: AbortSignal | nullOptional AbortSignal to cancel the resolve phase.
Readonly snapshot of all file entries.
Write the cache file and release the lock.
Can only be called once per session. After write completes (success or failure), the session is disposed and the lock is released.
Omitted user-value fields preserve the values read from disk. Config overrides (version, fingerprint, rootPath, files) are applied to the parent FileHashCache before writing.
Optionaloptions: FileHashCacheWriteOptions | nullOptional write options.
true if the write succeeded, false on lock failure.
A file hash cache session holding an exclusive OS-level lock.
Created by FileHashCache.open. Exposes what was read from disk as read-only properties. Pass payload values to write to override them; omitted fields preserve the old values.
The lock is released by write (after writing), by close, or by the
usingdisposable pattern.