Learn R Programming

toscutil (version 2.8.0)

xdg_config_home: Get XDG_CONFIG_HOME

Description

Return value for XDG_CONFIG_HOME as defined by the XDG Base Directory Specification

Usage

xdg_config_home(sep = "/", fallback = normalizePath(getwd(), winslash = sep))

Value

The following algorithm is used to determine the returned path:

  1. If environment variable (EV) XDG_CONFIG_HOME exists, return its value

  2. Else, if EV HOME exists, return $HOME/.config

  3. Else, if EV USERPROFILE exists, return $USERPROFILE/.config

  4. Else, return $fallback

Arguments

sep

Path separator to be used on Windows

fallback

Value to return as fallback (see details)

See Also

xdg_data_home()

Examples

Run this code
xdg_config_home()

Run the code above in your browser using DataLab