A rust library to setup and control loopback devices
Find a file
History 2017-12-20 18:31:44 +00:00
losetup Adds support for set_capacity ioctl 2017-12-20 17:06:10 +00:00
src Adds support for set_capacity ioctl 2017-12-20 17:06:10 +00:00
.gitignore Changes the global statics to consts 2017-12-05 10:23:17 +00:00
.travis.yml Removes doc building and adds building losetup to travis 2017-12-05 13:59:27 +00:00
Cargo.toml Splits out the attach method into three convinence function 2017-12-19 12:52:46 +00:00
LICENSE Adds some needed files 2016-05-20 23:33:08 +01:00
README.md Fixes losetup and renames size to sizelimit 2017-12-19 13:11:56 +00:00

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