package homedir

import "github.com/dotcloud/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.

On non-Windows platforms, it falls back to nss lookups, if the home directory cannot be obtained from environment-variables.

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 StickRuntimeDirContents

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

StickRuntimeDirContents is unsupported on non-linux system.

Source Files

homedir.go homedir_others.go

Version
v26.0.2+incompatible
Published
Apr 18, 2024
Platform
js/wasm
Imports
4 packages
Last checked
38 minutes ago

Tools for package owners.