ext4fs-rs
Rust implementation of ext4 file system in user space. The ext4 file system can be read directly without mounting, write operations are not supported yet. Your contributions are welcome.
:warning::warning::warning: The current api is not stable, it may be modified later, and more tests and documentation will need to be added.
Example
- New File System
// Read a raw ext4 image file.
let file = open.unwrap;
let reader = new;
let mut fs = from_reader.unwrap;
- Iterate a directory
let rd = fs.read_dir.unwrap;
for x in rd
- Stat a file
let m = fs.metadata.unwrap;
println!;
- Read symlink
let p = fs.read_link.unwrap;
println!;
- Read all contents of file
let b = fs.read.unwrap;
assert_eq!;
- Read file on demand
let mut f = fs.open.unwrap;
f.seek.unwrap;
let mut buf = String new;
f.read_to_string.unwrap;