Documentation ¶
Overview ¶
Package fileutil provides file utility functions, complementing the lower level abstractions found in the standard library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFileUpTo ¶ added in v0.21.0
CopyFileUpTo copies content of the file up to maxBytes it returns an error if file is larger than allowed maximum
func Getwd ¶ added in v0.2.0
func Getwd() string
Getwd returns a rooted path name corresponding to the current directory. If the current directory can be reached via multiple paths (due to symbolic links), Getwd may return any one of them.
On failure, will return "."
func IsReadableFile ¶
IsReadableFile reports whether the file exists and is readable. If the error is non-nil, it means there might be a file or directory with that name but we cannot read it.
Adapted from the upspin.io source code.