homedir

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetHomeDir = os.UserHomeDir

Functions

func CreateDirInConfigDir

func CreateDirInConfigDir(dirName string) (string, error)

func EnsureConfigDir

func EnsureConfigDir() (string, error)

EnsureConfigDir return the path to the config directory. It creates it if needed.

func ReadFromConfigDir

func ReadFromConfigDir(filename string) ([]byte, string, error)

ReadFromConfigDir reads the file from the config directory. It returns the file content and the path to the file.

func WriteToConfigDir

func WriteToConfigDir(filename string, data []byte, overwrite bool) (string, error)

WriteToConfigDir writes the data to the file in the config directory. It returns the path to the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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