open_ext2_drive

Function open_ext2_drive 

Source
pub fn open_ext2_drive<T>(disk: T) -> Result<Ext2<T>>
where T: Read + Seek + Write,
Expand description

Invocation of a new FileSystem instance: Take anything that implements Read + Seek + Write.

let f = std::fs::OpenOptions::new()
    .read(true)
    .write(true)
    .open(MY_DISK_OBJECT)
    .expect("open filesystem failed");
let ext2 = open_ext2_drive(f).unwrap();