Skip to main content

Crate fstool

Crate fstool 

Source
Expand description

fstool — build disk images and filesystems from a directory tree and TOML spec.

The crate is organised as a stack of three trait-based layers:

  • blockBlockDevice: raw seekable byte storage. Backends include on-disk files, in-memory buffers (for tests), and sub-range slices used to give each partition an isolated view.
  • partPartitionTable: MBR and GPT. (Coming in P2.)
  • fsFilesystem: ext2/3/4 in v1; FAT32 deferred. (Coming in P3+.)

High-level entry points for building or inspecting an image live at the crate root once P5 lands.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

analyze
Generic source analysis: walk a filesystem image, tar archive, host directory, or layered source once and report the aggregate metrics that determine how big a destination image needs to be — file / dir / symlink / device counts, total file bytes, and an ext inode/block estimate.
block
Block-device abstraction — the bottom layer of the fstool stack.
compression
Compression / decompression codecs.
concurrent
Shared-access wrappers for the otherwise-single-threaded Ext API.
error
Error type and Result alias for the crate.
format_opts
Filesystem-format options bag.
fs
Filesystem layer — the Filesystem trait and shared types.
inspect
Unified read-side API: probe an image, identify the filesystem on it, and expose a small inspection surface (list / cat / info) that the CLI can drive without knowing which filesystem it’s talking to.
macroman
MacRoman → Unicode decoding for classic-Mac byte strings.
merge
Layered source merging with whiteout / opaque-dir semantics.
part
Partition-table layer.
path_style
Path-spelling styles for the CLI and interactive shell.
repack
Repack — copy file trees from one source into a freshly-formatted destination filesystem.
resfork
Macintosh resource-fork parser + decoders for a few common types.
spec
TOML image-specification schema and the build driver.

Macros§

impl_archive_fs_filesystem
Generate the Filesystem impl for a format newtype struct Foo(ArchiveFs) by forwarding every method to the inner ArchiveFs.