Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteDir ¶
DeleteDir deletes the directory at the given path. It returns nil if the deletion succeeds, or the deletion error otherwise. If the directory does not exist, DeleteDir returns nil.
func ExpandFileList ¶
ExpandFileList takes a list of file globs and expands them into a list of matching file paths. It returns the expanded file list and any errors from glob matching. This allows safely passing user input globs through to glob matching.
func IsDir ¶
IsDir returns whether the given path is a directory. If the path does not exist, it returns (false, nil). If there is an error checking the path, it returns (false, err).
func IsDirEmpty ¶
IsDirEmpty checks if the directory at the given path is empty. It returns true if the directory is empty, false if not empty, or an error if there was a problem checking it.
func ReadStringOrFile ¶
ReadStringOrFile returns the content of a string or a file if the file exists. The returned boolean value indicates whether the specified `input` was a file path or not.
func WriteTmpFile ¶
WriteTmpFile creates a temporary file with the given name and content, and returns the path to the created file.
Types ¶
This section is empty.