Crate xdg_basedir [−] [src]
xdg-basedir is a utility library to make conforming to the XDG basedir specification easier.
Example
#![cfg(unix)] extern crate xdg_basedir; #![cfg(unix)] use xdg_basedir::*; use std::path::PathBuf; ... let data_home: PathBuf = try!(get_data_home()); ...
Alternate implementation and some initial source borrowed from rust-xdg.
The APIs provided by rust-xdg
and xdg-basedir
are different.
Reexports
pub use error::*; |
Modules
error |
Functions
get_cache_home |
Get the cache home directory. |
get_cache_home_from_env |
Get the cache home directory given a closure that returns the the value of an environment variable. This method allows having a custom environment. |
get_config_dirs |
Get the config directories. |
get_config_dirs_from_env |
Get the default config directories given a closure that returns the the value of an environment variable. This method allows having a custom environment. |
get_config_home |
Get the config home directory. |
get_config_home_from_env |
Get the config home directory given a closure that returns the the value of an environment variable. This method allows having a custom environment. |
get_data_dirs |
Get the data directories. |
get_data_dirs_from_env |
Get the default data directories given a closure that returns the the value of an environment variable. This method allows having a custom environment. |
get_data_home |
Get the data home directory. |
get_data_home_from_env |
Get the data home directory given a closure that returns the the value of an environment variable. This method allows having a custom environment. |
get_runtime_dir |
Get |
get_runtime_dir_from_env |
Get |