pub struct ScanReport {
pub dirs_read: u64,
pub entries: u64,
pub files_walked: u64,
pub bytes_walked: u64,
pub allocated_walked: u64,
pub errors: Vec<Error>,
pub attribution: WalkAttribution,
}Expand description
What a scan did, including the errors it walked past.
Unreadable directories are skipped rather than aborting the scan — a permission-denied subdirectory should not cost you the other 499,000 files — but they are reported rather than swallowed, so a caller can tell a complete answer from a partial one.
Fields§
§dirs_read: u64Directories successfully listed.
entries: u64Entries observed, directories included.
files_walked: u64Regular files whose metadata was observed.
bytes_walked: u64Apparent bytes represented by the regular files whose metadata was observed,
saturating at u64::MAX.
A measure of the walk’s work, not an answer: a tree whose total no u64 can hold
is refused where it is counted (crate::Error::UnrepresentableTotal), and this
tally stops at the bound rather than wrapping or panicking before that refusal.
allocated_walked: u64Allocated bytes of those files: what the default size metric counts, and what a
sparse disk image or a clone makes far smaller than their apparent bytes. It
saturates as bytes_walked does.
errors: Vec<Error>Paths that could not be read, with the reason.
attribution: WalkAttributionWhere the walk’s time went, summed across workers.
Implementations§
Source§impl ScanReport
impl ScanReport
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
True when every directory in scope was read successfully.