Expand description
§hadris-ntfs
A no_std-compatible library for reading NTFS filesystems (read-only).
§Quick Start
use std::fs::File;
use hadris_ntfs::sync::{NtfsFs, NtfsFsReadExt};
let file = File::open("disk.img").unwrap();
let fs = NtfsFs::open(file).unwrap();
let root = fs.root_dir();
let entries = root.entries().unwrap();
for entry in &entries {
println!("{} ({})", entry.name(), if entry.is_directory() { "dir" } else { "file" });
}§Feature Flags
| Feature | Default | Description |
|---|---|---|
std | Yes | Standard library support (enables alloc) |
alloc | Yes | Heap allocation without full std |
sync | Yes | Synchronous API via hadris-io sync traits |
async | No | Asynchronous API via hadris-io async traits |
read | Yes | Read operations (requires alloc) |
§Dual Sync/Async Architecture
This crate provides both synchronous and asynchronous APIs through a compile-time code transformation system. The same implementation source is compiled twice:
syncmodule: synchronous API (enabled by thesyncfeature)asyncmodule: asynchronous API (enabled byasyncfeature)
With the default sync and read features, the synchronous API types are
re-exported at the crate root for convenience. The std feature does not
select an I/O mode.
§Supported Scope
The reader supports validated boot geometry, update-sequence-protected
MFT/index records, resident and non-resident unnamed data, sparse runs,
initialized-size zero filling, directory index allocation/bitmaps, NTFS
filename namespaces, and $UpCase collation.
It does not yet resolve $ATTRIBUTE_LIST extension records, recover from
$MFTMirr, decode compressed or encrypted streams, expose named alternate
data streams, or interpret reparse points. See the internal compliance
matrix in docs/spec-coverage.md.