Skip to main content

Module tree

Module tree 

Source
Expand description

The rollup tree: the filesystem tree pruned to paths that lead to something reclaimable, with each node carrying the bytes recoverable beneath it.

A node’s number is not “how big is this directory” — that is dua’s question — but “how much would I get back by emptying this subtree”. A source directory with nothing reclaimable under it never appears.

The rollup is a post-order sum, accumulated on the way down rather than in a second pass. It can be, because the only nodes carrying weight are the claims and claims are always leaves (the walk prunes there). So totals are correct after every insert, which is what lets the TUI render a partial tree while the scan is still running.

Nodes do leave, and only one way: Tree::remove, when the deleter reports a claim gone. Every rollup here is therefore a quantity that can be taken back out again — which is a constraint on what may be rolled up rather than an incidental property. Sums subtract. Node::modified does not, and is recomputed from what is left.

Structs§

Node
One directory on a path to something reclaimable.
Sort
An order and whether it is upside down.
Tree
The pruned filesystem tree produced by a walk.

Enums§

Order
How a level orders its children.

Type Aliases§

NodeId
A handle to a node. Stable for the life of the tree.