pub struct RollUp {
pub files: u64,
pub dirs: u64,
pub bytes: u64,
pub allocated: u64,
pub newest_mtime_ns: i64,
pub by_ext: BTreeMap<String, ExtTally>,
}Expand description
Pre-computed aggregate state for one directory’s entire subtree.
§What is counted
bytes and allocated sum files only. Directories contribute their own subtree
plus one to dirs, but their own inode block usage is not added — unlike du, which
counts directory blocks. The difference is small and constant per directory, and
making it configurable is deferred rather than guessed at.
newest_mtime_ns is the newest modification time among descendant files.
Directory mtimes are excluded because they change on every child add or remove, which
makes “what changed recently” answer with directories instead of the edits a user
actually made.
Fields§
§files: u64Descendant files.
dirs: u64Descendant directories, not counting the directory that owns this roll-up.
bytes: u64Apparent bytes across descendant files.
allocated: u64Allocated bytes across descendant files.
newest_mtime_ns: i64Newest mtime among descendant files, or 0 when there are none.
by_ext: BTreeMap<String, ExtTally>Per-extension file and byte tallies across the subtree.