fsutil

package
v1.2.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureEmptyDirectory

func EnsureEmptyDirectory(path string, perm fs.FileMode) error

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL