#volume #disk #devices #mount

disket

Cross-platform abstractions for disks/volumes management

1 unstable release

new 0.1.0 May 14, 2025

#734 in Filesystem

MIT license

28KB
537 lines

disket

crates.io docs.rs build license

disket is a Rust cross-platform library for managing disks and volumes. It provides high-level APIs for mount/unmounting, fetching information and watching arrival/removal of devices.

Usage

To start using disket, add this to your Cargo.toml:

[dependencies]
disket = "0.1.0"

This will add the set of default features. Check the documentation for other features.

The following block shows some basic functionality. It retrieves disks, mounts every partition and does the same whenever a new device arrives.

fn main() -> Result<(), Box<dyn Error>> {
    todo!()
}

Supported platforms

Check the support section of the documentation.

Contributing

Contributions are very much welcome. You can just make a PR, and we'll discuss right there if needed. If it is something you are not so sure about or anything that changes the public API, open an issue.

New platforms don't need to be available for every module, but they should be fully compatible with the abstraction layer of the module they are in. A new platform for the mount module should be compatible with its public API.

Dependencies

~0.2–29MB
~480K SLoC