pub enum CacheState {
Current(SnapshotInfo),
Stale(StaleReason),
Leftover(LeftoverKind),
Unrecognized,
Absent,
}Expand description
What a path in the cache holds.
Variants§
Current(SnapshotInfo)
A snapshot this build reads and can serve.
Stale(StaleReason)
One of fdu’s snapshots that this build cannot serve. Clearing removes it.
Leftover(LeftoverKind)
A file fdu wrote that is not a snapshot in place: a staging file a killed writer never renamed, or a content sidecar whose snapshot is gone.
Clearing the whole directory reclaims it, under the rules on LeftoverKind.
Unrecognized
A file fdu cannot identify as one of its own, which clearing never removes.
Its contents lack the magic its name implies, or it is not a regular file (a symbolic link is never followed, and a directory is never descended into), or it was found by listing a directory under a name the cache gives nothing.
Absent
Nothing is there. Only a status for one path can be absent; a listing reports the files it found.