mirror of
https://github.com/KernelSU-Next/loopdev.git
synced 2026-11-16 22:51:34 +00:00
A rust library to setup and control loopback devices
- Rust 100%
|
History
|
||
|---|---|---|
| losetup | ||
| src | ||
| .gitignore | ||
| .travis.yml | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
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.get_path().unwrap().display());
ld.attach("test.img", 0).unwrap();
// ...
ld.detach().unwrap();