Update deps
This commit is contained in:
19
vendor/github.com/adrg/xdg/xdg.go
generated
vendored
19
vendor/github.com/adrg/xdg/xdg.go
generated
vendored
@@ -67,6 +67,12 @@ var (
|
||||
// swapped out to disk.
|
||||
RuntimeDir string
|
||||
|
||||
// BinHome defines the base directory relative to which user-specific
|
||||
// binary files should be written. This directory is defined by
|
||||
// the non-standard $XDG_BIN_HOME environment variable. If the variable is
|
||||
// not set, a default equal to $HOME/.local/bin should be used.
|
||||
BinHome string
|
||||
|
||||
// UserDirs defines the locations of well known user directories.
|
||||
UserDirs UserDirectories
|
||||
|
||||
@@ -104,6 +110,7 @@ func Reload() {
|
||||
RuntimeDir = baseDirs.runtime
|
||||
|
||||
// Set non-standard directories.
|
||||
BinHome = baseDirs.binHome
|
||||
FontDirs = baseDirs.fonts
|
||||
ApplicationDirs = baseDirs.applications
|
||||
}
|
||||
@@ -154,8 +161,9 @@ func CacheFile(relPath string) (string, error) {
|
||||
// The relPath parameter must contain the name of the runtime file, and
|
||||
// optionally, a set of parent directories (e.g. appname/app.pid).
|
||||
// If the specified directories do not exist, they will be created relative
|
||||
// to the base runtime directory. On failure, an error containing the
|
||||
// attempted paths is returned.
|
||||
// to the base runtime directory. If the base runtime directory does not exist,
|
||||
// the operating system's temporary directory is used as a fallback. On failure,
|
||||
// an error containing the attempted paths is returned.
|
||||
func RuntimeFile(relPath string) (string, error) {
|
||||
return baseDirs.runtimeFile(relPath)
|
||||
}
|
||||
@@ -194,8 +202,11 @@ func SearchCacheFile(relPath string) (string, error) {
|
||||
|
||||
// SearchRuntimeFile searches for the specified file in the runtime search path.
|
||||
// The relPath parameter must contain the name of the runtime file, and
|
||||
// optionally, a set of parent directories (e.g. appname/app.pid). If the
|
||||
// file cannot be found, an error specifying the searched path is returned.
|
||||
// optionally, a set of parent directories (e.g. appname/app.pid). The runtime
|
||||
// file is also searched in the operating system's temporary directory in order
|
||||
// to cover cases in which the runtime base directory does not exist or is not
|
||||
// accessible. If the file cannot be found, an error specifying the searched
|
||||
// paths is returned.
|
||||
func SearchRuntimeFile(relPath string) (string, error) {
|
||||
return baseDirs.searchRuntimeFile(relPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user