1 unstable release
0.1.5 | Aug 22, 2022 |
---|---|
0.1.3 |
|
0.1.2 |
|
0.1.1 |
|
0.1.0 |
|
#16 in #ubuntu
9KB
160 lines
auto_mount
auto_mount has a function that automatically mounts a newly inserted device as a gpt partition.
Important Caution
All hdds in /dev/sd*
will be formatted.
example
use auto_mount::{
change_devices_to_gpt, create_partition, filter_unmounted_hdd_devices, find_connected_satas,
format_devices, mount_devices,
};
fn main() {
let devices = find_connected_satas();
let devices = filter_unmounted_hdd_devices(devices);
change_devices_to_gpt(&devices);
let devices = create_partition(&devices);
format_devices(&devices);
mount_devices(&devices);
}
Thanks for read
Please register improvements, etc. in the issue
gool luck!
lib.rs
:
auto_mount
auto_mount has a function that automatically mounts a newly inserted device as a gpt partition.
example
let devices = find_connected_satas();
let devices = filter_unmounted_hdd_devices(devices);
change_devices_to_gpt(&devices);
let devices = create_partition(&devices);
format_devices(&devices);
mount_devices(&devices);
Dependencies
~0.7–1MB
~20K SLoC