package
1.9.2
Repository: https://github.com/tkestack/tke.git
Documentation: pkg.go.dev

# Functions

DirExists returns true if a directory exists at `path`, false if `path` does not exist, otherwise an error.
EnsureDir ensures that a directory exists at `path`, and if it must create the directory any necessary parent directories will also be created and the new directory will be empty.
EnsureFile ensures that a regular file exists at `path`, and if it must create the file any necessary parent directories will also be created and the new file will be empty.
FileExists returns true if a regular file exists at `path`, false if `path` does not exist, otherwise an error.
GetAllFiles gets all files in the specified directory, including files in subdirectories.
ReadFileWithDir reads the file named by filename in dir and returns the contents.
ReplaceDir replaces the contents of the dir at `path` with `files` by writing to a tmp dir in the same dir as `path` and renaming the tmp dir over `path`.
ReplaceFile replaces the contents of the file at `path` with `data` by writing to a tmp file in the same dir as `path` and renaming the tmp file over `path`.
WriteFileWithDir writes data to a file named by filename in dir.
WriteTempDir creates a temporary dir at `path`, writes `files` into it, and fsyncs all the files The keys of `files` represent file names.
WriteTmpFile creates a temporary file at `path`, writes `data` into it, and fsyncs the file Expects the parent directory to exist.