Expand description
Cuprate directories and filenames.
§Environment variables on Linux
Note that this module’s functions uses dirs
,
which adheres to the XDG standard on Linux.
This means that the values returned by these statics may change at runtime depending on environment variables, for example:
By default the config directory is ~/.config
, however
if $XDG_CONFIG_HOME
is set to something, that will be
used instead.
std::env::set_var("XDG_CONFIG_HOME", "/custom/path");
assert_eq!(
CUPRATE_CONFIG_DIR.to_string_lossy(),
"/custom/path/cuprate"
);
Reference:
Constants§
- CUPRATE_
DIR - Cuprate’s main directory.
- DEFAULT_
CONFIG_ FILE_ NAME - The default name of Cuprate’s config file.
Statics§
- CUPRATE_
CACHE_ DIR - Cuprate’s cache directory.
- CUPRATE_
CONFIG_ DIR - Cuprate’s config directory.
- CUPRATE_
DATA_ DIR - Cuprate’s data directory.
Functions§
- address_
book_ path - Cuprate’s address-book directory.
- blockchain_
path - Cuprate’s blockchain directory.
- logs_
path - Cuprate’s logs directory.
- txpool_
path - Cuprate’s txpool directory.