containerfs

package
v25.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanScopedPath

func CleanScopedPath(path string) string

CleanScopedPath prepares the given path to be combined with a mount path or a drive-letter. On Windows, it removes any existing driveletter (e.g. "C:"). The returned path is always prefixed with a filepath.Separator.

func EnsureRemoveAll

func EnsureRemoveAll(dir string) error

EnsureRemoveAll wraps `os.RemoveAll` to check for specific errors that can often be remedied. Only use `EnsureRemoveAll` if you really want to make every effort to remove a directory.

Because of the way `os.Remove` (and by extension `os.RemoveAll`) works, there can be a race between reading directory entries and then actually attempting to remove everything in the directory. These types of errors do not need to be returned since it's ok for the dir to be gone we can just retry the remove operation.

This should not return a `os.ErrNotExist` kind of error under any circumstances

func ResolveScopedPath deprecated

func ResolveScopedPath(root, path string) (string, error)

ResolveScopedPath evaluates the given path scoped to the root. For example, if root=/a, and path=/b/c, then this function would return /a/b/c.

Deprecated: use symlink.FollowSymlinkInScope.

Types

This section is empty.

Jump to

Keyboard shortcuts

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