xdg

package module
v0.0.0-...-64ca0aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

XDG

Get xdg configuration directories.

Documentation

Overview

Package xdg is a helper package to get configuration directories according to the XDG Base Directory Specification

See docs:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cache

func Cache(name string) string

func Config

func Config(name string) string

func ConfigDirs

func ConfigDirs(name string) []string

func Data

func Data(name string) string

func DataDirs

func DataDirs(name string) []string

func NewDirFinder

func NewDirFinder(name string) *dirFinder

func Runtime

func Runtime(name string) string

func State

func State(name string) string

Types

type Dir

type Dir string

func (Dir) Append

func (d Dir) Append(name string) Dir

func (Dir) Create

func (d Dir) Create() error

func (Dir) Exists

func (d Dir) Exists() bool

func (Dir) Split

func (d Dir) Split() []string

func (Dir) String

func (d Dir) String() string

type DirFinder

type DirFinder interface {
	Name() string
}

type XDG

type XDG struct {
	// contains filtered or unexported fields
}

func NewXDG

func NewXDG(finder DirFinder) *XDG

func (*XDG) Cache

func (xdg *XDG) Cache() string

func (*XDG) Config

func (xdg *XDG) Config() string

func (*XDG) ConfigDirs

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

func (*XDG) Data

func (xdg *XDG) Data() string

func (*XDG) DataDirs

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

func (*XDG) Runtime

func (xdg *XDG) Runtime() string

func (*XDG) State

func (xdg *XDG) State() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL