Skip to content

A rust library to setup and control loopback devices

License

Notifications You must be signed in to change notification settings

mdaffin/loopdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status crates.io

loopdev

Setup and control loop devices.

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

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();