loopdev 0.2.0

Setup and control loop devices
Documentation

Build Status crates.io

loopdev

Setup and control loop devices.

Provides rust interface with similar functionalty to the linux utility losetup.

Documentation

Examples

use loopdev::LoopControl;
let lc = LoopControl::open().unwrap();
let ld = lc.next_free().unwrap();

println!("{}", ld.path().unwrap().display());

ld.attach_file("test.img").unwrap();
// ...
ld.detach().unwrap();