Function userdata_dir

Source
pub fn userdata_dir(
    workspace: bool,
    strategy: Option<&str>,
    manifest_dir: &str,
) -> PathBuf
Expand description

Determines common user data directory used by veloren frontends.

The first specified in this list is used.

  1. The VELOREN_USERDATA environment variable
  2. The VELOREN_USERDATA_STRATEGY environment variable
  3. The CARGO_MANIFEST_DIR/userdata or CARGO_MANIFEST_DIR/../userdata depending on if a workspace if being used

§VELOREN_USERDATA_STRATEGY environment variable

Read during compilation and useful to set when compiling for distribution.

Available options are:

  • “system” => system specific project data directory
  • “executable” => /userdata

Note: case insensitive