Crates.io | system_diskinfo |
lib.rs | system_diskinfo |
version | 0.2.2 |
source | src |
created_at | 2023-07-03 15:21:52.228441 |
updated_at | 2024-02-01 21:45:45.357075 |
description | A package for collect information about system disk drive etc. |
homepage | |
repository | https://github.com/neyaznafiz/system-diskinfo |
max_upload_size | |
id | 907127 |
size | 8,567 |
A package for collect information about disk drive means SSD/HDD etc of a windows operating system.
You can collect disk information from any device with just a function call. you will be able to collect the disk name
, disk model
, disk size
and disk serial number
information of a windows system with this package.
Install Package
cargo add system_diskinfo
Add Dependencies
system_diskinfo = "0.2.2"
driveName
driveSize
driveModel
driveSerialNumber
drive_name()
for collect the name of system disk drive.drive_size()
for collect the total capacity of disk drive.drive_model()
for collect the model of system disk drive.drive_serial_number()
for collect the serial number of system disk drive.First of all add this package to your dependencies
in cargo.toml
file, then open a file where you want to use and add the package in the top of the file like use system_diskinfo
, after that, to get the correct output use it like this:
system_diskinfo
)::
)driveName
)::
)drive_name
)We are printing here the total capacity information about the disk drive of a windows system.
cargo.toml
[dependencies]
system_diskinfo = "0.2.2"
main.rs
use system_diskinfo;
fn main() {
let size = system_diskinfo::driveSize::drive_size();
println!("Disk Drive Size: {}", size);
}
Open your terminal with the correct path of your project and run cargo run
command
--- Output ---
Disk Drive Size: 512105932800