Documentation ¶
Overview ¶
Package fileutil implements file utilities.
Index ¶
- func Copy(src, dst string) error
- func CopyAppend(src, dst string) error
- func EnsureExecutable(p string) error
- func Exist(name string) bool
- func GetTempFilePath() (path string)
- func IsDirWriteable(dir string) error
- func MkTmpDir(baseDir string, pfx string) (dir string)
- func WriteTempFile(d []byte) (path string, err error)
- func WriteToTempDir(p string, d []byte) (path string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyAppend ¶ added in v1.2.7
CopyAppend copies a file and appends to the destination file.
func EnsureExecutable ¶ added in v0.4.4
EnsureExecutable sets the executable file mode bits, for all users, to ensure that we can execute a file
func GetTempFilePath ¶ added in v1.1.6
func GetTempFilePath() (path string)
GetTempFilePath creates a file path to a temporary file that does not exist yet.
func IsDirWriteable ¶ added in v1.1.8
IsDirWriteable checks if dir is writable by writing and removing a file. It returns error if dir is NOT writable. If the director does not exist, it returns nil.
func WriteTempFile ¶
WriteTempFile writes data to a temporary file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.