xdg: github.com/OpenPeeDeeP/xdg Index | Files

package xdg

import "github.com/OpenPeeDeeP/xdg"

Package xdg impelements the XDG standard for application file locations.

Index

Package Files

xdg.go xdg_linux.go

func CacheHome Uses

func CacheHome() string

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

func ConfigDirs Uses

func ConfigDirs() []string

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

func ConfigHome Uses

func ConfigHome() string

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

func DataDirs Uses

func DataDirs() []string

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

func DataHome Uses

func DataHome() string

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

type XDG Uses

type XDG struct {
    Vendor      string
    Application string
}

XDG is information about the currently running application

func New Uses

func New(vendor, application string) *XDG

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

func (*XDG) CacheHome Uses

func (x *XDG) CacheHome() string

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

func (*XDG) ConfigDirs Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

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.

Package xdg imports 3 packages (graph) and is imported by 5 packages. Updated 2019-03-14. Refresh now. Tools for package owners.