Expand description
External files a lowering read, with the fingerprint each had at the
time, so a cached LowerResult can be checked
against the filesystem before it is reused (issue #125).
Structs§
- External
Dependency - One external file a lowering depended on: an
#image/#figureraster or a#bibliographysource. - External
Inputs 🔒 - Resource access for a directive, using the enclosing lowering’s snapshot.
- File
Identity - The device and inode numbers and the status-change time of a file on
Unix. Unlike the modification time, none of these can be set from
userspace, so a rewrite that restores the old mtime still moves one of
them. Every field is
Noneon platforms that do not expose them. - File
System Reader - Default resource reader, restricted to regular files.
- Fingerprint
- What a regular file looked like when it was read: its
statfields, the moment thatstatwas taken, and afingerprint_byteshash of its contents. - Resource
Data - Bytes returned by a
ResourceReader. - Resource
Snapshot - Captured external inputs belonging to one lowering result.
Enums§
- Resource
Fingerprint - A resource content hash, optionally accompanied by filesystem freshness metadata.
Constants§
- DOMAIN_
TAG 🔒 - RACY_
WINDOW - A modification time this close to the moment the fingerprint was taken is
not trusted by
ExternalDependency::is_current: a second write inside the same filesystem timestamp tick would leavestatunchanged. Two seconds covers FAT’s timestamp resolution.
Traits§
- Resource
Reader - Supplies image and bibliography bytes at already-resolved source paths.
Functions§
- fingerprint_
bytes - Fingerprint raw file bytes for dependency comparison.
- fingerprint_
file - The
Fingerprintof the regular file atpath, orNonewhen there is no readable regular file there. Directories, devices, and pipes are never opened. - read_
fingerprinted 🔒 - Read the regular file at
pathand fingerprint it in one pass. Thestatis taken before the read, so a write that lands between the two shows up as a changedstaton the nextExternalDependency::is_currentand forces a hash comparison. - regular_
file_ 🔒metadata