module XDG
Extended Modules
Defined in:
helpers.crxdg.cr
Instance Method Summary
-
#cache_file(name : Path | String) : Path | Nil
The path to the named state file if it exists in
XDG::CACHE::HOME
($XDG_CACHE_HOME) - #cache_file(name : Path | String, *, binary = false, mode = nil, & : File -> T) forall T
-
#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) orXDG::CONFIG::DIRS
($XDG_CONFIG_DIRS). -
#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.
-
#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) orXDG::DATA::DIRS
($XDG_DATA_DIRS). -
#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.
-
#state_file(name : Path | String) : Path | Nil
The path to the named state file if it exists in
XDG::STATE::HOME
($XDG_STATE_HOME) -
#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.
Instance Method Detail
The path to the named state file if it exists in XDG::CACHE::HOME
($XDG_CACHE_HOME)
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).
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.
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).
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.
The path to the named state file if it exists in XDG::STATE::HOME
($XDG_STATE_HOME)
Open a state file if it exists in $XDG_STATE_HOME, otherwise create it. Reads happen from the beggining of the file.