utils

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppDirs appDirs

Functions

func ApplyDefaultXdgEnv

func ApplyDefaultXdgEnv()

func AtomicWrite added in v0.6.0

func AtomicWrite(bytes []byte, path string) error

func Download

func Download(src, dest string) error

func ExpandEnv

func ExpandEnv(text string) string

func FileExists

func FileExists(filename string) bool

func GetHomeDir

func GetHomeDir() (string, error)

func GetKeyValueStorePath added in v0.6.0

func GetKeyValueStorePath() (string, error)

func GetRulesFilePath

func GetRulesFilePath() string

func MoveDirectory added in v0.5.0

func MoveDirectory(source, dest string) error

func MoveFile

func MoveFile(sourcePath, destPath string) error

func MovePath added in v0.5.0

func MovePath(source, dest string) error

Try to move file/directory with os.Rename and if that fails, do a copy + delete

func OpenOrCreate added in v0.5.0

func OpenOrCreate(filepath string) (*os.File, error)

func PathExists added in v0.5.0

func PathExists(path string) (bool, error)

func XdgDefaults added in v0.5.0

func XdgDefaults() map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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