xdg

package
v0.0.0-...-0798a42 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachePath

func CachePath(paths ...string) string

Return a path relative to the user home cache dir

func ConfigPath

func ConfigPath(paths ...string) string

Return a path relative to the user home config dir

func DataPath

func DataPath(paths ...string) string

Return a path relative to the user data home dir

func ExpandHome

func ExpandHome(fragments ...string) string

Replace ~ with the current user's home dir

func HomeDir

func HomeDir() string

Get the current user home directory (first from the $HOME env var and fallback on calling getpwuid_r() from libc if $HOME is unset).

func RuntimePath

func RuntimePath(paths ...string) string

Return a path relative to the user runtime dir

func TildeHome

func TildeHome(path string) string

Replace $HOME with ~ (inverse function of ExpandHome)

Types

This section is empty.

Jump to

Keyboard shortcuts

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