Skip to content

Architecture

CLI arguments
│
▼
mount provider ──► normalized Mount records
│
▼
pre-statfs filters ──► selected mounts ──► statfs measurement
│ │
└──► Linux block topology ▼
│ capacity filters
└──► optional device rows │
▼
columns and color renderer

The provider boundary keeps operating-system APIs out of formatting code. Mount is the normalized seam: native providers and file fixtures both return the same record. Metadata-based visibility filters select records before the shared refresh_stats function performs bounded arithmetic; capacity-dependent checks follow measurement. Linux block-device ancestry is read only when a device selector or unmounted rows are requested.

macOS uses getmntinfo(3) and copies the native source, mount directory, and filesystem type strings. This is why APFS volumes are visible without relying on Linux’s /proc/self/mounts. Linux uses that kernel-backed listing as its default provider and supports the same parser for explicit overrides.

The minimal native view is capacity-based and type-aware. It does not assume that every reportable filesystem starts with /dev; that matters for overlay, ZFS, and other valid filesystem sources. Loop-backed squashfs mounts are hidden in the concise view, and explicit group filters can select them.

The durable architecture records are ADR-0001 and ADR-0002.