Crate dirs

Source
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

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.