util

package
v0.0.0-...-e289d49 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) (err error)

CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherwise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.

func DirEmpty

func DirEmpty(path string) bool

DirEmpty checks if the given directory is empty

func Exists

func Exists(path string) bool

Exists simply checks if a path exists and panics on error

func FullPath

func FullPath(dir string) string

FullPath wraps filepath.Abs and panics on error

func RelPath

func RelPath(dir string) string

RelPath makes a path relative to the cwd, if it fails it simply returns the original path

Types

This section is empty.

Jump to

Keyboard shortcuts

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