utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(source string, dest string) (err error)

Recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist.

func CopyFile

func CopyFile(source string, dest string) (err error)

Copies file source to destination dest.

func CopyFileWithHash added in v0.0.4

func CopyFileWithHash(path string) error

func GenerateAssetHash added in v0.0.4

func GenerateAssetHash(path string) (string, error)

func HasFile added in v0.3.0

func HasFile(path string) bool

func Watch added in v0.3.0

func Watch(dir []string) *watcher.Watcher

Types

type CustomError

type CustomError struct {
	What string
}

A struct for returning custom error messages

func (*CustomError) Error

func (e *CustomError) Error() string

Returns the error message defined in What as a string

Jump to

Keyboard shortcuts

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