Documentation
¶
Overview ¶
Package file helps with file handling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ReadLines = BigReadLines
ReadLines reads all lines of a file into lines.
Functions ¶
func BigReadLines ¶
BigReadLines reads all lines of a file into lines. https://stackoverflow.com/questions/7424340/read-in-lines-in-a-text-file-sort-then-overwrite-file
func Copy ¶
Copy copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.
func Random ¶
Random creates a random file containing s and returns its name. See ioutil.Tempfile() for dir and pattern.
func ReadString ¶
ReadString returns filename content as string
func WriteLines ¶
WriteLines writes string slice containing lines to file
Types ¶
This section is empty.