Expand description
Windows-first desktop utility helpers for Rust apps.
This crate provides small helpers for common Windows desktop-app tasks: opening files and URLs, revealing items in Explorer, sending files to the Recycle Bin, enforcing single-instance behavior, resolving app-data directories, and dealing with elevation.
§Example
fn main() -> Result<(), win_desktop_utils::Error> {
let path = win_desktop_utils::local_app_data("demo-app")?;
assert!(path.ends_with("demo-app"));
Ok(())
}Re-exports§
pub use error::Error;pub use error::Result;pub use elevation::is_elevated;pub use elevation::restart_as_admin;pub use instance::single_instance;pub use instance::InstanceGuard;pub use paths::ensure_local_app_data;pub use paths::ensure_roaming_app_data;pub use paths::local_app_data;pub use paths::roaming_app_data;pub use shell::move_to_recycle_bin;pub use shell::open_url;pub use shell::open_with_default;pub use shell::reveal_in_explorer;