Mode implementation

For what image and live mode mean to a user, and what each platform supports, see Modes. This page covers how the split works in the code.

APFS follows the native-operation design described below. NTFS is read-only for now, so it shares the image parser for every technique.

Why live mode differs per technique

Live slack-space is in scope (see Home). So hide, clear, and detect with --technique slack-space and no --image must notice a missing privilege and fail with a clear error. They must not quietly degrade. See slack-space privilege.

Two Entry implementations

Each filesystem package has two Entry implementations. They are not two modes bolted onto one.

Live mode per platform

macOS (APFS). The code is in internal/filesystem/apfs/live_darwin.go. See APFS for its raw-device limit. Pointing live mode at a mounted NTFS, ext4, or other non-APFS volume is covered in Only APFS, nothing else, even on macOS.

Windows (NTFS). The code is in internal/filesystem/ntfs/live_windows.go. It gives read-only volume access through the existing image parser.

See NTFS.

Linux (ext4).

Choosing the filesystem

registry.go detects the filesystem by signature. That applies to image mode only.

The live router picks by platform: NTFS on Windows, APFS on macOS, ext4 on Linux. Other platforms get build-tagged unsupported stubs.

Each live opener checks that the volume is really its filesystem.