utils

package
v0.0.0-...-cefda66 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTplNotFound = errors.New("Template file not found")
)

Functions

func CopyFile

func CopyFile(dst, src string, flag int)

copy copies the file src to dst, via memory (so only good for small files).

func GetExistingPathFor

func GetExistingPathFor(file, currDir string) (string, error)

func IsDirectory

func IsDirectory(name string) bool

IsDirectory reports whether the named file is a directory.

func IsFile

func IsFile(name string) bool

func ReadFile

func ReadFile(file string) string

ReadFile returns the content of the named file.

func WriteFile

func WriteFile(b, file string, flag int)

WriteFile writes b to the named file, creating it if needed. if exec is non-zero, marks the file as executable. If the file already exists and has the expected content, it is not rewritten, to avoid changing the time stamp.

Types

This section is empty.

Jump to

Keyboard shortcuts

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