Documentation
¶
Overview ¶
Package fsdelta computes the content-based difference of a directory tree between two points in time: which regular files were created, modified, or deleted. It backs the `changes:` assertion target (#70), which pins exactly what a run/pty step touched in the scenario workdir.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Delta ¶
Delta is the content-based difference between a pre and post Snapshot. Each list is sorted for deterministic reporting.
type Snapshot ¶
Snapshot maps a regular file's forward-slash path (relative to the scanned root) to a hex-encoded SHA-256 of its content. Directories and symlinks are not tracked: a rename is delete+create in v1, and an empty directory is not a "file" the assertion reasons about.
func Scan ¶
Scan walks root and hashes every regular file, keyed by its forward-slash path relative to root. It is best-effort about individual files: one that cannot be opened or read is skipped rather than failing the whole scan, so a transient permission quirk never turns a delta assertion into an engine error. A nil root scan (root missing) returns an empty snapshot.