Expand description
A lazy file-tree model.
The model is deliberately free of GTK and I/O: it stores a small directory
cache keyed by path, expands lazily (children are only read when a directory
is expanded), and translates filesystem change events into incremental
cache updates. Directory content enters through the DirSource trait, so
the model can be unit-tested against an in-memory filesystem and driven by
the real std::fs reader in production (StdDirSource).
Structs§
- DirNode
- Per-directory cached state inside the model.
- Entry
Info - A single directory entry as discovered by a
DirSource. - Sort
Options - Sorting rules applied to every directory listing.
- StdDir
Source - Reads directory listings from the real filesystem via
std::fs. - Tree
Model - The lazy tree model. All methods are
&mut selfbecause expand/collapse mutate the cache; the UI mutates it freely since it owns it. - Visible
Row - One rendered line of the tree. The UI derives both its widget and its indentation from this value; no GTK types leak in here.
Enums§
- Change
- A change that happened on disk, in model vocabulary. Produced by
super::watcherfrom raw notify events and by file operations. - SortKey
- The primary key used to order entries within a directory.
Traits§
- DirSource
- The seam from which the model obtains directory listings.