fiemap 0.2.0

call ioctl FIEMAP on files with ease
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::env::args;
use std::fs::File;
use std::io::Error;

fn main() -> Result<(), Error> {
    for f in args().skip(1) {
        println!("{}:", f);
        let file = File::open(f)?;
        for fe in fiemap::Fiemap::new(&file) {
            println!("  {:?}", fe?);
        }
    }

    Ok(())
}