Documentation ¶
Overview ¶
Package xdg provides functions for handling cross-platform configuration, data and state directories.
Index ¶
- func Cache(name string) (string, error)
- func CacheHome() (string, bool)
- func Config(name string, local bool) (string, error)
- func ConfigDirs() (string, bool)
- func ConfigHome() (string, bool)
- func Data(name string, local bool) (string, error)
- func DataDirs() (string, bool)
- func DataHome() (string, bool)
- func Runtime(name string) (string, error)
- func RuntimeDir() (string, bool)
- func State(name string) (string, error)
- func StateHome() (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cache ¶
Cache returns the path to the named file found in the cache directory obtained from CacheHome. If no file is found Cache returns ENOENT.
func Config ¶
Config returns the path to the named file found first in the list of config directories obtained from ConfigHome, and ConfigDirs if local is false. If no file is found Config returns ENOENT.
func ConfigDirs ¶
ConfigDirs returns the path list corresponding to XDG_CONFIG_DIRS.
func ConfigHome ¶
ConfigHome returns the path corresponding to XDG_CONFIG_HOME.
func Data ¶
Data returns the path to the named file found first in the list of data directories obtained from DataHome, and DataDirs if local is false. If no file is found Data returns ENOENT.
func Runtime ¶
Runtime returns the path to the named file found in the runtime directory obtained from RuntimeDir. If no file is found Runtime returns ENOENT.
func RuntimeDir ¶
RuntimeDir returns the path corresponding to XDG_RUNTIME_DIR.
Types ¶
This section is empty.