Documentation
¶
Overview ¶
Package file provides helpers for common file system interactions such as creating, reading and removing files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFile ¶
ReadFile reads a file from disk and returns a bytes.Reader containing the file contents.
func ReadLines ¶
ReadLines reads a text file line by line and returns a slice of strings. The file is opened for reading and closed automatically. An error is returned if the file cannot be opened or scanned.
func RemoveAll ¶
func RemoveAll(tempDir string)
RemoveAll recursively deletes the directory at tempDir. Any error encountered is logged but not returned.
func RemoveFile ¶
func RemoveFile(filePath string)
RemoveFile deletes the file located at filePath. Errors are logged and not returned to the caller.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.