Skip to main content

format_tree

Function format_tree 

Source
pub fn format_tree(
    entries: &[Entry],
    colorizer: &Colorizer,
    icons: bool,
    indicator: IndicatorStyle,
) -> String
Expand description

Render a tree from a flat recursive listing (entries with depth).

Also works for a single non-recursive directory by treating all entries as depth 0.

Rendering is O(n) in the number of entries (precomputed last-sibling flags).