Expand description
The dirs crate is
- a tiny library with a minimal API (18 public functions)
- that provides the platform-specific, user-accessible locations
- for finding and storing configuration, cache and other data
- on Linux, Redox, Windows (≥ Vista) and macOS.
The library provides the location of these directories by leveraging the mechanisms defined by
- the XDG base directory and the XDG user directory specifications on Linux,
- the Known Folder system on Windows, and
- the Standard Directories on macOS.
Functions§
- audio_
dir - Returns the path to the user’s audio directory.
- cache_
dir - Returns the path to the user’s cache directory.
- config_
dir - Returns the path to the user’s config directory.
- config_
local_ dir - Returns the path to the user’s local config directory.
- data_
dir - Returns the path to the user’s data directory.
- data_
local_ dir - Returns the path to the user’s local data directory.
- desktop_
dir - Returns the path to the user’s desktop directory.
- document_
dir - Returns the path to the user’s document directory.
- download_
dir - Returns the path to the user’s download directory.
- executable_
dir - Returns the path to the user’s executable directory.
- font_
dir - Returns the path to the user’s font directory.
- home_
dir - Returns the path to the user’s home directory.
- picture_
dir - Returns the path to the user’s picture directory.
- preference_
dir - Returns the path to the user’s preference directory.
- public_
dir - Returns the path to the user’s public directory.
- runtime_
dir - Returns the path to the user’s runtime directory.
- state_
dir - Returns the path to the user’s state directory.
- template_
dir - Returns the path to the user’s template directory.
- video_
dir - Returns the path to the user’s video directory.