gpt
A pure-Rust library to work with GPT partition tables.
gpt
provides support for manipulating (R/W) GPT headers and partition
tables. It supports raw disk devices as well as disk images.
Example
extern crate gpt;
use ;
use ;
A pure-Rust library to work with GPT partition tables.
gpt
provides support for manipulating (R/W) GPT headers and partition
tables. It supports raw disk devices as well as disk images.
extern crate gpt;
use gpt::header::{Header, read_header};
use gpt::partition::{Partition, read_partitions};
fn inspect_disk() {
let filename = "/dev/sda";
let h = read_header(filename).unwrap();
println!("Disk header: {:#?}", h);
let p = read_partitions(filename, &h).unwrap();
println!("Partition layout: {:#?}", p);
}