Crates.io | disk-name |
lib.rs | disk-name |
version | 1.0.0 |
source | src |
created_at | 2024-08-22 08:41:40.590031 |
updated_at | 2024-08-22 08:41:40.590031 |
description | A utility crate to get all existing disk names |
homepage | |
repository | https://github.com/ValuONE/disk-name |
max_upload_size | |
id | 1347437 |
size | 8,578 |
Key Features • Installation • Usage • Platforms • Contributors • License
In a previous project, I needed to retrieve a list of all disk names. While I attempted to use the WinAPI, I found the process cumbersome and disliked the involving unsafe calls. As a result, I decided to implement my own solution using the Rust standard library.
Use the cargo add disk-name
command or add it manually to your cargo.toml file
[dependencies]
disk-name = "1.0.0"
The disk-name crate exposes one function to call.
fn main() {
let disk_names: Vec<String> = get_letters();
println!("{:#?}", disk_names);
}
With that simple call all existing letter names are printed.