platform-dirs-rs
A small Rust library for obtaining platform dependant directory paths for application and user directories.
Note that the directory paths are not guaranteed to exist.
Allows for specifying if an application is CLI or GUI based, since on macOS, CLI applications are expected to conform to the XDG spec, while GUI applications are expected to conform to the Standard Directories guidelines.
The API is still being flushed out, so feel free to PR any breaking changes or additions.
Example
use ;
if let Some = new
app_dirs.config_dir;
// Linux: /home/alice/.config/program-name
// Windows: C:\Users\Alice\AppData\Roaming\program-name
// macOS: /Users/Alice/Library/Application Support/program-name
}
if let Some =
if let Some = new
Installation
Add the following to Cargo.toml:
[]
= "0.1.0"