Documentation ¶
Overview ¶
Package file provides helpers to work with files.
Index ¶
Constants ¶
View Source
const (
UserPath = "PATH"
)
Variables ¶
View Source
var ( ErrCloseFile = errors.New("file: file close error") ErrCreateDir = errors.New("file: failed to create directory") ErrFileNotFound = errors.New("file: file not found") ErrInvalidFilename = errors.New("file: invalid filename") ErrInvalidTriplet = errors.New("file: invalid triplet") ErrOpenFile = errors.New("file: failed to open file") ErrScanFile = errors.New("file: file scan error") )
Functions ¶
func BinaryMode ¶
BinaryMode returns the file mode of filename in binary digits.
func CreateDirIfNotExists ¶
CreateDirIfNotExists creates a directory, and all its parents, if it does not exist.
func GetStrings ¶
GetStrings reads all lines from filename and returns a slice of string.
func IsExecutableInPath ¶
IsExecutableInPath returns true if filename is an executable and exists in the user PATH.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.