Skip to main content

aggregate_tree

Function aggregate_tree 

Source
pub fn aggregate_tree(
    out: (impl Write, bool),
    err: Option<impl Write>,
    walk_options: WalkOptions,
    byte_format: ByteFormat,
    paths: Vec<PathBuf>,
    max_depth: usize,
    compute_total: bool,
    sort_by_size_in_bytes: bool,
) -> Result<WalkResult>
Expand description

Traverse paths and write an indented tree of their disk usage to out, descending up to max_depth levels below each given root.

The given roots are at depth 0, so max_depth of 0 lists only them (the same set of entries the flat aggregation prints), 1 also lists their children, and higher values reveal deeper entries. When compute_total is set and more than one root is given, a trailing total line is written. sort_by_size_in_bytes sorts the children at each level ascending by size, otherwise they are left in the order they were discovered.