Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheHome ¶
func CacheHome() string
CacheHome is a directory that user specific non-essential (cached) data should be written.
func ConfigDirs ¶
func ConfigDirs() []string
ConfigDirs returns a list of directories that config files should be find in this order. ConfigHome() always be the first entry.
func ConfigHome ¶
func ConfigHome() string
ConfigHome is directory stores user specific configuration files.
func DataDirs ¶
func DataDirs() []string
DataDirs returns a list of directories that data files should be find in this order. DataHome() always be the first entry.
func DataHome ¶
func DataHome() string
DataHome returns the directory that user data should written to.
func ResolveConfigFile ¶
ResolveConfigFile find file in ConfigDirs(), returns first found file. Return error if path not found, or the found path is not a regular file.
func ResolveDataFile ¶
ResolveDataFile find file in DataDirs(), returns first found file. Return error if path not found, or the found path is not a regular file.
func RuntimeHome ¶
func RuntimeHome() string
RuntimeHome returns xdg runtime directory. Use XDG_RUNTIME_DIR if defined. Default to /tmp/[user]/ for non-root users, /run for root user.
NOTE: /tmp/[user]/ noramlly not exist, RuntimeHome() do not create or check it exists.
Types ¶
This section is empty.