Tanguv0.35.0
System & I/O20 exports
Raw Markdown

/os/well-known

Cross-platform XDG / OS standard directories (config-dir, cache-dir, data-dir, home-dir, download-dir).

(use /os/well-known)

Functions & symbols#

cache-dir#

function
(cache-dir) -> (Or String Error)

Returns the host OS path for the user cache directory (XDG_CACHE_HOME).

Returns:Any
(wk/cache-dir)

config-dir#

function
(config-dir) -> (Or String Error)

Returns the host OS path for the user-specific configuration directory (XDG_CONFIG_HOME / AppData).

Returns:Any
(wk/config-dir)

data-dir#

function
(data-dir) -> (Or String Error)

Returns the host OS path for the roaming user data directory (XDG_DATA_HOME).

Returns:Any
(wk/data-dir)

data-local-dir#

function
(data-local-dir) -> (Or String Error)

Returns the host OS path for the machine-local application data directory.

Returns:Any
(wk/data-local-dir)

desktop-dir#

function
(desktop-dir) -> (Or String Error)

Returns the host OS path for the user Desktop directory.

Returns:Any
(wk/desktop-dir)

document-dir#

function
(document-dir) -> (Or String Error)

Returns the host OS path for the user Documents directory.

Returns:Any
(wk/document-dir)

download-dir#

function
(download-dir) -> (Or String Error)

Returns the host OS path for the user Downloads directory.

Returns:Any
(wk/download-dir)

executable-dir#

function
(executable-dir) -> (Or String Error)

Returns the host OS path for the user binary/executable directory (~/.local/bin).

Returns:Any
(wk/executable-dir)

font-dir#

function
(font-dir) -> (Or String Error)

Returns the host OS path for the user Fonts directory.

Returns:Any
(wk/font-dir)

get-app-dirs#

function
(get-app-dirs qualifier org app) -> Map

Computes standard OS app directories `{:config-dir :data-dir :cache-dir :state-dir ...}` for an application ID.

ParameterTypeOptionalDescription
qualifierStringrequiredReverse-domain qualifier (e.g. "com")
orgStringrequiredOrganization name
appStringrequiredApplication name
Returns:Any
(wk/get-app-dirs "dev" "tangu" "cli")

get-user-dirs#

function
(get-user-dirs) -> Map

Returns a Map of all standard OS user directories (`:home-dir`, `:desktop-dir`, `:download-dir`, ...).

Returns:Any
(wk/get-user-dirs)

home-dir#

function
(home-dir) -> (Or String Error)

Returns the host OS path for the current user's home directory.

Returns:Any
(wk/home-dir)

music-dir#

function
(music-dir) -> (Or String Error)

Returns the host OS path for the user Music directory.

Returns:Any
(wk/music-dir)

picture-dir#

function
(picture-dir) -> (Or String Error)

Returns the host OS path for the user Pictures directory.

Returns:Any
(wk/picture-dir)

preference-dir#

function
(preference-dir) -> (Or String Error)

Returns the host OS path for the user preference directory.

Returns:Any
(wk/preference-dir)

public-dir#

function
(public-dir) -> (Or String Error)

Returns the host OS path for the user Public share directory.

Returns:Any
(wk/public-dir)

runtime-dir#

function
(runtime-dir) -> (Or String Error)

Returns the host OS path for the user runtime socket/PID directory (XDG_RUNTIME_DIR).

Returns:Any
(wk/runtime-dir)

state-dir#

function
(state-dir) -> (Or String Error)

Returns the host OS path for the user state data directory (XDG_STATE_HOME).

Returns:Any
(wk/state-dir)

template-dir#

function
(template-dir) -> (Or String Error)

Returns the host OS path for the user Templates directory.

Returns:Any
(wk/template-dir)

video-dir#

function
(video-dir) -> (Or String Error)

Returns the host OS path for the user Videos directory.

Returns:Any
(wk/video-dir)