auto_mount

Crates.ioauto_mount
lib.rsauto_mount
version0.1.5
sourcesrc
created_at2022-08-19 06:25:06.893947
updated_at2022-08-22 10:32:08.306462
descriptionauto_mount has a function that automatically mounts a newly inserted device as a gpt partition.
homepage
repositoryhttps://github.com/ski0090/auto_mount
max_upload_size
id648576
size14,567
shalom (ski0090)

documentation

https://docs.rs/auto_mount

README

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!

Commit count: 9

cargo fmt