Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotDirectory = errors.New("not a directory")
)
Functions ¶
func DeleteReadOnlyRecursive ¶
DeleteReadOnlyRecursive deletes the directory with path given by `root`. Prior to deleting the directory, the directory and all descendant files and directories are set as writable. If any chmod or deletion error occurs it is immediately returned.
func EnsureEmptyDirectory ¶
EnsureEmptyDirectory ensures the directory given by `path` is empty. If the directory does not exist, it will be created with permission bits given by `perm`. If the directory exists, it will not simply rm -rf && mkdir -p as the calling process may not have permissions to delete the directory. E.g. in the case of a pod mount. Rather, it will delete the contents of the directory.
func GetDirectoryModTime ¶
GetDirectoryModTime returns the modification time of the directory at dirPath. If stat(dirPath) fails, an error is returned with a zero-value time.Time. If dirPath is not a directory, an ErrNotDirectory error is returned.
func SetReadOnlyRecursive ¶
SetReadOnlyRecursive recursively sets files and directories under the path given by `root` as read-only
func SetWritableRecursive ¶
SetWritableRecursive recursively sets files and directories under the path given by `root` as writable
Types ¶
This section is empty.