chickadee » xdg-basedir » xdg-data-home

xdg-data-home #!key (create-directory? #t) (set-environment? #t)procedure

Return the value of the XDG_DATA_HOME environment variable if it is set and is not empty. Otherwise return the path to .local/share/ under the user home directory.

By default, the directory represented by the path returned by this procedure is created if it does not exist. This behavior can be disabled by binding the create-directory? keyword parameter of this procedure to #f).

By default, this procedure sets the XDG_DATA_HOME environment variable with its return value in case the environment variable is not set. This behavior can be disabled by binding the set-environment? keyword parameter to #f).