# Functions
Atomic will perform the provided function in an "atmoic" fashion.
CopyFile copies the source file to the sink file truncating it if it already exists.
CopyFileRangeTo is similar to 'CopyFileTo' but allows specifying an offset/length.
CopyFileTo copies all the data from the file at the provided path into the given writer.
Create a new file at the provided path in read/write mode, any existing file will be truncated when opening.
CreateFile creates a new file (or truncates an existing one) at the provided path using the given flags/mode.
DirExists returns a boolean indicating whether a directory at the provided path exists.
FileExists returns a boolean indicating whether a file at the provided path exists.
FileSize returns the size in bytes of the file at the provided path.
Mkdir creates a new directory with the provided mode and may optionally create all parent directories.
OpenRandAccess opens the provided file whilst advising the kernel that we'll be accessing the byte range from start to end with a random access pattern; this should decrease the pre-fetch amount and avoid bloating the page cache with data that we'll only be using once.
OpenSeqAccess opens the provided file whilst advising the kernel that we'll be accessing the byte range from start to end sequentially; this should increase the pre-fetch amount for this file.
ReadIfProvided is the equvilent to 'os.ReadFile' but will return <nil>, <nil> if no path is provided.
ReadJSONFile unmarshals data from the provided file into the given interface.
Remove the file/directory at the given path.
RemoveAll removes all the files/directories at the provided path.
Sync the provided file to disk.
Touch is analogous to the unix 'touch' command, it updates the access/modified times of the file at the provided path creating it if it doesn't exist.
WriteAt writes data to the given offset in the file at the provided path.
WriteFile writes out the provided data to the file at the given path.
WriteJSONFile marshals the provided interface and writes it to a file at the given path.
WriteTempFile writes out the provided data to a temporary file in the given directory (OS temporary directory if omitted) and returns the path to that file.
WriteToFile copies all the data from the provided reader and writes it to the file at the given path.
# Constants
DefaultDirMode represents the default file mode which will be used if a zero value file mode is provided for operations which create new directories.
DefaultFileMode represents the default file mode which will be used if a zero value file mode is provided for operations which create new files.
# Variables
ErrNotDir is returned by 'DirExists' if a file exists at the provided path.
ErrNotFile is returned by 'FileExists' if a directory exists at the provided path.