path

package
v0.0.0-...-17ed7cf Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirectoryPermissions = 0755
	FilePermissions      = 0644
)

Variables

View Source
var UserHomeDir = func() string {
	user, err := userinfo.GetRegularUser()
	if err != nil {
		panic("cannot determine user home directory")
	}

	return user.HomeDir
}()

Functions

func CreateIfNotExists

func CreateIfNotExists(path, defaultContent string) error

func ExpandTilde

func ExpandTilde(path *string) error

func GetEnvWithDefaultValue

func GetEnvWithDefaultValue(environmentVariable string, defaultValue string) string

func PathExists

func PathExists(path string) (bool, error)

func RandomLetters

func RandomLetters(length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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