Back to godoc.org
github.com/OpenPeeDeeP/xdg

package xdg

v0.2.0
Latest Go to latest
Published: Dec 29, 2018 | License: BSD-3-Clause | Module: github.com/OpenPeeDeeP/xdg

Overview

Package xdg impelements the XDG standard for application file locations.

Index

func CacheHome

func CacheHome() string

CacheHome returns the location that should be used for application cache files

func ConfigDirs

func ConfigDirs() []string

ConfigDirs returns a list of locations that should be used for system wide config files

func ConfigHome

func ConfigHome() string

ConfigHome returns the location that should be used for user specific config files

func DataDirs

func DataDirs() []string

DataDirs returns a list of locations that should be used for system wide data files

func DataHome

func DataHome() string

DataHome returns the location that should be used for user specific data files

type XDG

type XDG struct {
	Vendor      string
	Application string
}

XDG is information about the currently running application

func New

func New(vendor, application string) *XDG

New returns an instance of XDG that is used to grab files for application use

func (*XDG) CacheHome

func (x *XDG) CacheHome() string

CacheHome returns the location that should be used for application cache files for this specific application

func (*XDG) ConfigDirs

func (x *XDG) ConfigDirs() []string

ConfigDirs returns a list of locations that should be used for system wide config files for this specific application

func (*XDG) ConfigHome

func (x *XDG) ConfigHome() string

ConfigHome returns the location that should be used for user specific config files for this specific application

func (*XDG) DataDirs

func (x *XDG) DataDirs() []string

DataDirs returns a list of locations that should be used for system wide data files for this specific application

func (*XDG) DataHome

func (x *XDG) DataHome() string

DataHome returns the location that should be used for user specific data files for this specific application

func (*XDG) QueryCache

func (x *XDG) QueryCache(filename string) string

QueryCache looks for the given filename in XDG paths for cache files. Returns an empty string if one was not found.

func (*XDG) QueryConfig

func (x *XDG) QueryConfig(filename string) string

QueryConfig looks for the given filename in XDG paths for config files. Returns an empty string if one was not found.

func (*XDG) QueryData

func (x *XDG) QueryData(filename string) string

QueryData looks for the given filename in XDG paths for data files. Returns an empty string if one was not found.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier