Expand description
The fdu command line, and the engine it is built on.
The command line lives here and depends on fdu_core the way any consumer does, so
crate:: does not reach the engine: anything the command line needs is public API, and
the compiler decides that on every build rather than a reviewer deciding it in review.
The engine is re-exported, so cargo add fdu gives a library caller the whole API and
there is one name to know for both installing the tool and depending on it.
Modules§
- admission
- Fixed rules that decide which filesystem facts belong in an index.
- cache
- Inspecting and clearing the snapshot cache.
- classify
- File-type recognition.
- content
- Optional, versioned file-content analysis.
- control
- Bounded, removal-aware control state used to classify retained filesystem facts.
- counters
- Low-distortion performance instrumentation for fdu.
- query
- Queries over a built index: what to select, which roll-ups to report, and the value grammars both are written in.
- report_
format - Serializing a
Reportto text, JSON, JSONL, and YAML. - scan
- The scan layer: walking a tree, producing observations, and applying reconciliation.
- snapshot
- Persisting an index to disk and reading it back.
- watch
- Th OS-native watch layer: turning an unreliable event stream into verified observations.
- watch_
session - A live session: an index, a watcher, and the query they answer together.
Structs§
- Analyzer
Provenance - The analyzers a content tier’s records were produced by, and the options they ran with.
- Apply
Outcome - Result of arbitrating and applying one producer observation.
- Apply
Stats - Summary of what one
Index::applycall did. - Attrs
- The stat fields an entry contributes to roll-ups, plus the ones that identify it.
- Batch
- One batch of applied changes.
- Cache
Paths - The two files for one canonical root key in an application cache directory.
- Cache
Status - What is known about one file in the cache directory.
- Change
- One effective change, already filtered through the run’s selection.
- Change
Poll - Result of one opened-root journal poll.
- Change
Request - Input to one blocking opened-root journal poll.
- Child
Snapshot - One direct child captured from a shared index at a single read boundary.
- Clear
Summary - What one clear removed.
- Clock
- A monotonic logical clock, in the spirit of Watchman’s clockspec but process-local.
- Commit
- One atomic, exact index transition.
- Content
Admission - Proof that stored content can be projected to one requested identity.
- Content
Info - The header facts that identify a content sidecar.
- Content
Status - What is known about the content sidecar beside a snapshot.
- Content
Tier Identity - Identity of a content tier: the per-file analysis records a sidecar holds.
- Continuation
Id - Opaque identifier for resumable work retained by one opened root.
- Control
Identity - Stable, non-sensitive identity of one retained control source.
- Control
Limits - The two bounds on the control state one index retains, each liftable on its own.
- Control
Matcher - A path-bound view over the controls that may govern it.
- Control
Observation - The control files an observing index applied and refused.
- Control
Table - Exact
.gitignoresources and parsed matchers, keyed by governing directory. - Discovery
Budget - Resource bounds applied to progressive discovery.
- Discovery
Progress - Committed, bounded discovery counters.
- Engine
Version - Identity and exact sequence of one committed opened-root state.
- EntryId
- Identifier for an entry within an
Indexarena. - Entry
Scope - Which entries a scan retains: its depth, symlink, filesystem-boundary, hidden-entry, and special-object settings.
- Entry
Tier Identity - Identity of an entry tier: the entries a store holds and the roll-ups derived from them.
- Entry
Value - One immutable retained entry returned by an opened-root read.
- ExtTally
- Per-extension tally within a roll-up.
- Fingerprint
- The fingerprint used to decide whether an entry really changed.
- Flat
Page - One portable flat-entry page.
- Hidden
Policy - Whether leading-dot path components are retained.
- Impact
- Bounded invalidation guidance derived from exact effective changes.
- Index
- The in-memory hierarchical index.
- Index
Handle - Shareable owner for serving readers while reconciliation applies short writes.
- Index
State - Coherent public state captured at an index commit boundary.
- Issue
- Bounded diagnostic evidence retained with an index state.
- Issue
Summary - Counts for the bounded issue details captured with a state.
- Observation
- A producer batch awaiting arbitration by the index.
- Observation
Op - One observed operation together with its arbitration precondition.
- Open
Options - Configuration for a long-lived
OpenedIndex. - Open
Report - What
opendid. - Opened
Index - A long-lived, synchronously controlled filesystem index.
- Page
Request - Output and work bounds for one resumable page.
- Partition
Roll Up - The two fixed aggregate partitions maintained for inventory reads.
- Partition
Roll UpSummary - Constant-size totals for the fixed all and unignored partitions.
- Path
Expectation - State and entry revisions captured at one observation boundary.
- Pending
Save - A snapshot write running alongside rendering.
- Performance
Summary - Operational work behind one one-shot report.
- Plan
- Validated policy shared by all engine execution routes.
- Portable
Path - A retained entry’s canonical POSIX-relative name, in the form ordered pages use.
- Progress
- A handle a route reports its progress through.
- Progress
Snapshot - What a route has done so far, as read at one moment.
- Provenance
- Everything a consumer needs to decide how far to trust one value.
- Query
Limit - Typed bounded-query result; no partial calculation is presented as exact.
- Read
Diagnostics - Fixed-size diagnostics captured with a coherent read.
- Read
Request - Input to one coherent opened-root read.
- Read
Response - One coherent opened-root response.
- Reconcile
Report - Filesystem and index effects from an applying reconciliation pass.
- Refresh
Result - Result of one bounded, multi-path refresh.
- Refused
Control - One control file whose rules an index refused, relative to the index root.
- Rejected
Refresh Path - One refresh path that the engine declined, with its typed reason.
- Report
Request - The read half of a request at an opened root, plus one read’s work bound.
- RollUp
- Pre-computed aggregate state for one directory’s entire subtree.
- Roll
UpSummary - Constant-size directory totals suitable for bounded interactive rows.
- Scan
Config - Knobs for a scan.
- Scan
Report - What a scan did, including the errors it walked past.
- Scan
Scope - Semantic inputs that decide which entries and derived values belong in an index.
- Semantic
Identity - Answer-semantics identity derived from validated classification and reducer rules.
- Session
- An index paired with a watcher, answering one request continuously.
- Session
Id - Opaque identity of one opened-root lifetime.
- Since
- Result of
Index::since. - Snapshot
Identity - The identity of every tier a metadata snapshot holds.
- Snapshot
Info - The header facts that identify a snapshot.
- Tree
Page - One structural page of a directory’s descendants, to the requested depth.
- Work
- Bounded work performed while committing producer input or serving engine reads.
Enums§
- Cache
Policy - Whether a request may read and write the snapshot cache.
- Cache
Scope - Which snapshots a cache-lifecycle request covers.
- Cache
State - What a path in the cache holds.
- Change
Kind - What happened to a path.
- Change
Outcome - Journal outcome at one coherent terminal version and state.
- Content
State - What a content sidecar beside a snapshot holds.
- Control
Admission - What a control table did with one verified control source.
- Control
Coverage - Whether an index’s ignore classification applies every control file in its scope.
- Control
Refusal Reason - Which of the
ControlLimitsrefused a control source instead of applying its rules. - Control
Tier Identity - Identity of a
.gitignorecontrol tier. - Count
Result - Product count whose exactness is explicit.
- Coverage
- Structural coverage of one opened root.
- Coverage
Reason - Why an opened root cannot claim complete structural coverage.
- Effective
Change - One exact fact mutation performed by the index.
- Entry
Kind - What kind of filesystem entry a record describes.
- Error
- Errors the engine can report.
- Expectation
- The condition under which an observation may be committed.
- Freshness
- Trust state for an index or queried subtree.
- Impact
Domain - A stable fdu-native answer domain that one commit may have made stale.
- Invalidate
Reason - Why a producer had to escalate to
Op::InvalidateSubtreeinstead of describing a change precisely. - Issue
Kind - Stable category for one non-fatal condition or terminal provider failure.
- Knowledge
- Three-valued knowledge for a path lookup.
- Leftover
Kind - Which of fdu’s own files a leftover is.
- Lifecycle
Phase - Current activity of one opened root.
- Limited
Projection - Projection whose deterministic work allowance was exhausted.
- Load
- Which persisted state execution may read.
- Op
- A single change to one path.
- Open
Path - Which tier of the freshness ladder an
openactually used. - Outcome
Class - Whether an answer fulfills the caller’s delivery contract.
- Path
State - The complete indexed state of one path at an observation boundary.
- Progress
Phase - Which kind of work a route is doing.
- Projection
Refusal - Why one projection of a read refused, while every other projection still answered.
- Projection
Result - One projection result, in the same position as its request.
- Read
Projection - One fdu-native projection requested under a coherent read boundary.
- Refresh
Rejection - Why one requested refresh path was not verified.
- Route
- The engine lifecycle that will deliver an answer.
- RowShape
- Retained fields copied into portable page rows.
- Save
Outcome - The result of a throttled attempt to persist a live session.
- Scan
Order - The order directories are visited in.
- Serves
- How a stored tier answers a request.
- Source
- Where a value came from, so a consumer can trade speed for certainty knowingly.
- Stale
Reason - Why a snapshot fdu wrote cannot be served by this build.
- State
Transition - One observable transition that did not change a retained filesystem entry.
- Status
- Whether a value covers everything beneath its path.
- Verify
- Whether execution must verify the filesystem.
Constants§
- CONTROL_
FILE_ NAME - Name of the fixed control file understood by the first engine version.
- DEFAULT_
CONTROL_ BUDGET - Default retained control-table charge for one index, in bytes.
- DEFAULT_
CONTROL_ LINE_ LIMIT - Default longest line a control source may hold, in bytes.
- DEFAULT_
COUNT_ CAP - Default cap for a selection count not backed by an exact maintained aggregate.
- DEFAULT_
JOURNAL_ CAPACITY_ BYTES - Approximate bytes the exact commit history used by
Index::sincemay retain. - MAX_
CONTINUATION_ RECORD_ BYTES - Maximum retained payload for one handle-local continuation record.
- MAX_
COUNT_ CAP - Maximum caller-selected cap for an on-demand aggregate.
- MAX_
DIRTY_ PATHS - Maximum number of individual dirty paths retained in one commit.
- MAX_
ISSUE_ MESSAGE_ BYTES - Maximum UTF-8 bytes retained in one rendered issue message.
- MAX_
ISSUE_ PATH_ BYTES - Maximum native encoded bytes retained for one issue path.
- MAX_
PAGE_ ROWS - Maximum rows returned by one page projection.
- MAX_
PAGE_ WORK - Maximum deterministic work allowance accepted by one page projection.
- MAX_
PRIORITY_ PATHS - Maximum paths accepted by one best-effort priority request.
- MAX_
READ_ PROJECTIONS - Maximum native projections accepted by one coherent read.
- MAX_
REFRESH_ PATHS - Maximum paths accepted by one refresh operation.
- MAX_
REPORT_ VIEWS - Maximum report sections and reported omissions accepted in one opened read.
- MAX_
RETAINED_ ISSUES - Maximum issue details retained by one index image.
- MIN_
JOURNAL_ CAPACITY_ BYTES - Smallest journal budget, in bytes, an opened root accepts.
Functions§
- cache_
status - Read one cache file’s status without materializing its index.
- clear_
all_ caches - Remove every fdu snapshot in a cache directory, current or stale, and reclaim the files fdu left behind, leaving anything else alone.
- clear_
cache - Remove one snapshot, current or stale, with its content sidecar.
- default_
cache_ dir - The application cache directory, resolved independently of a scanned root.
- default_
cache_ path - Conventional metadata snapshot path for callers without an explicit destination.
- default_
cache_ path_ in - The conventional metadata snapshot location for a root in the resolved directory.
- is_
control_ file - Whether a relative path names the fixed control file: the canonical path every control operation, and the table, name a directory’s rules by.
- list_
caches - Enumerate every entry in the cache directory.
- open
- Open a tree, using the snapshot cache when one is usable.
- open_
with_ pending_ save - Open a tree, returning the snapshot write for the caller to join.
- plan
- Validate a request and derive the least-retention plan for its delivery and route.
- prepare_
report - Execute a one-shot report, retaining the least state the request needs.
- prepare_
report_ with_ progress - Execute a one-shot report, reporting its progress through
progressas it runs. - prepare_
report_ with_ scan_ diagnostics - Execute a one-shot report and retain scan diagnostics.
- refresh
- Reverify a retained index, refresh requested content, and persist according to delivery.
- run_
process - Run
fduthrough its real process boundary and return its stable numeric exit code. - serves_
snapshot - Whether a snapshot of the
storedidentity answers a request forwanted. - throughput_
rates - Cumulative walk rates over one actual elapsed sample. The byte rate is binary GiB/s,
rounded to three decimals; the grouped file rate counts complete files per second.
Returns
(files_per_second, gib_per_second)without unit labels, orNonewhen elapsed time is zero. Neither rate estimates storage read bandwidth.
Type Aliases§
- Result
- Result alias for engine operations.