Skip to main content

Crate disk_core

Crate disk_core 

Source
Expand description

The base crate under every rusty-backup filesystem, partition and disk-image crate.

Always available:

  • io_other / repeat_n: std shims that build on both current Rust and Rust 1.73 (the last toolchain whose std targets macOS 10.7).
  • display: small neutral formatters (sizes, Mac OSType, Unix modes).
  • bits: big-endian allocation-bitmap helpers (HFS, HFS+, ProDOS).
  • rust173 (feature rust173-polyfill only): extension traits standing in for std methods missing on 1.73. Never enable it on a modern toolchain.

With the fs feature (on by default), the interface every filesystem crate (fs-8bit, fs-mac, …) implements:

  • filesystem: Filesystem (read) and EditableFilesystem (write), FilesystemError, create/repair options.
  • entry: FileEntry, EntryType and directory display ordering.
  • fsck: integrity-check results shared by every checker.
  • times: Unix timestamps and the calendar conversions filesystems need.
  • xattr: extended-attribute names and values.
  • unix_common: inode, bitmap, compaction and validation helpers shared by Unix-style filesystems.

Partition and disk-image crates depend on this with default-features = false and so build without the filesystem types and their dependencies.

Modules§

bits
Big-endian (MSB-first) allocation-bitmap helpers, as used by HFS, HFS+ and ProDOS.
display
Small, filesystem-neutral formatters used when showing entries to a person.
entry
filesystem
fsck
Shared filesystem check (fsck) and repair types.
times
Per-file Unix timestamps shared across the create / import / export paths, plus the format-specific encoders every non-Unix driver needs to write those same times into its own on-disk shape.
unix_common
xattr
Shared extended-attribute type, used across every filesystem that carries POSIX-style xattrs (SquashFS, ext, XFS).

Functions§

io_other
Construct an io::Error of kind Other wrapping error.
repeat_n
An iterator that repeats value exactly count times.