Skip to main content

Crate libpfs3

Crate libpfs3 

Source
Expand description

libpfs3 — PFS3 (Professional File System III) library.

Pure Rust implementation of the Amiga PFS3 filesystem. Supports reading, writing, formatting, and checking PFS3 disk images and raw partitions.

§Reading files

use libpfs3::volume::Volume;
let mut vol = Volume::open_rdb(std::path::Path::new("disk.hdf")).unwrap();
for entry in vol.list_dir("/").unwrap() {
    println!("{}", entry.name);
}
let data = vol.read_file("S/Startup-Sequence").unwrap();

§Writing files

use libpfs3::volume::Volume;
use libpfs3::writer::Writer;
let vol = Volume::open_rdb(std::path::Path::new("disk.hdf")).unwrap();
let mut w = Writer::open(vol).unwrap();
w.write_file("hello.txt", b"Hello from Rust!").unwrap();
w.create_dir("NewDir").unwrap();

Modules§

anode
Anode (extent) lookup and chain traversal.
bitmap
Bitmap reading for free block counting (statfs).
cache
O(1) LRU block cache for reserved blocks (dirblocks, anodeblocks, indexblocks).
dir
Directory block reading and entry iteration.
error
Error types for libpfs3.
format
PFS3 filesystem formatter (mkfs).
io
Block device abstraction.
ondisk
PFS3 on-disk structures and constants.
rdb
RDB (Rigid Disk Block) partition detection for Amiga disk images.
util
Utility functions: datestamp conversion, protection bits, charset.
volume
PFS3 volume: top-level read-only access to a PFS3 partition.
writer
Writable PFS3 volume — file/directory creation and deletion.