cuprate_helper

Module fs

Source
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§

Statics§