module

XDG

Instance methods

cache_file(name : Path | String) : Path | Nil

The path to the named state file if it exists in XDG::CACHE::HOME ($XDG_CACHE_HOME)

Source
cache_file(name : Path | String, *, binary = false, mode = nil, & : File -> T) forall T
Source
config_file(name : Path | String) : Path | Nil

The path to the named config file if it exists in any of XDG::CONFIG::HOME ($XDG_CONFIG_DIRS) or XDG::CONFIG::DIRS ($XDG_CONFIG_DIRS).

Source
config_file(name : Path | String, *, binary = false, mode = nil, & : File -> T) : T forall T

Open a config file for appending if it exists in any of $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS, otherwise create it. Reads happen from the beggining of the file.

Source
data_file(name : Path | String) : Path | Nil

The path to the named data file if it exists in any of XDG::DATA::HOME ($XDG_DATA_DIRS) or XDG::DATA::DIRS ($XDG_DATA_DIRS).

Source
data_file(name : Path | String, *, binary = false, mode = nil, & : File -> T) : T forall T

Open a data file for appending if it exists in any of $XDG_DATA_HOME or $XDG_DATA_DIRS, otherwise create it. Reads happen from the beggining of the file.

Source
state_file(name : Path | String) : Path | Nil

The path to the named state file if it exists in XDG::STATE::HOME ($XDG_STATE_HOME)

Source
state_file(name : Path | String, *, binary = false, mode = nil, & : File -> T) : T forall T

Open a state file if it exists in $XDG_STATE_HOME, otherwise create it. Reads happen from the beggining of the file.

Source

Nested types