Struct loopdev::LoopControl
[−]
[src]
pub struct LoopControl { /* fields omitted */ }Interface to the loop control device: /dev/loop-control.
Methods
impl LoopControl[src]
pub fn open() -> Result<LoopControl>[src]
Opens the loop control device.
pub fn next_free(&self) -> Result<LoopDevice>[src]
Finds and opens the next available loop device.
Examples
use loopdev::LoopControl; let lc = LoopControl::open().unwrap(); let ld = lc.next_free().unwrap(); println!("{}", ld.get_path().unwrap().display());