package homedir

import "github.com/docker/docker/pkg/homedir"

Index

Functions

func Get

func Get() string

Get returns the home directory of the current user with the help of environment variables depending on the target operating system. Returned path should be used with "path/filepath" to form new paths.

If linking statically with cgo enabled against glibc, ensure the osusergo build tag is used.

If needing to do nss lookups, do not disable cgo or set osusergo.

func GetConfigHome

func GetConfigHome() (string, error)

GetConfigHome is unsupported on non-linux system.

func GetDataHome

func GetDataHome() (string, error)

GetDataHome is unsupported on non-linux system.

func GetLibHome

func GetLibHome() (string, error)

GetLibHome is unsupported on non-linux system.

func GetRuntimeDir

func GetRuntimeDir() (string, error)

GetRuntimeDir is unsupported on non-linux system.

func GetShortcutString

func GetShortcutString() string

GetShortcutString returns the string that is shortcut to user's home directory in the native shell of the platform running on.

func Key

func Key() string

Key returns the env var name for the user's home dir based on the platform being run on

func StickRuntimeDirContents

func StickRuntimeDirContents(files []string) ([]string, error)

StickRuntimeDirContents is unsupported on non-linux system.

Source Files

homedir_others.go homedir_unix.go

Version
v23.0.2+incompatible
Published
Mar 23, 2023
Platform
js/wasm
Imports
3 packages
Last checked
1 hour ago

Tools for package owners.