Skip to main content

Module model

Module model 

Source
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.
EntryInfo
A single directory entry as discovered by a DirSource.
SortOptions
Sorting rules applied to every directory listing.
StdDirSource
Reads directory listings from the real filesystem via std::fs.
TreeModel
The lazy tree model. All methods are &mut self because expand/collapse mutate the cache; the UI mutates it freely since it owns it.
VisibleRow
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::watcher from 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.