MCPcopy
hub / github.com/containerd/containerd / CanonicalizePath

Function CanonicalizePath

core/mount/mount.go:80–88  ·  view source on GitHub ↗

CanonicalizePath makes path absolute and resolves symlinks in it. Path must exist.

(path string)

Source from the content-addressed store, hash-verified

78// CanonicalizePath makes path absolute and resolves symlinks in it.
79// Path must exist.
80func CanonicalizePath(path string) (string, error) {
81 // Abs also does Clean, so we do not need to call it separately
82 path, err := filepath.Abs(path)
83 if err != nil {
84 return "", err
85 }
86
87 return filepath.EvalSymlinks(path)
88}
89
90// ReadOnly returns a boolean value indicating whether this mount has the "ro"
91// option set.

Callers 5

unmountRecursiveFunction · 0.92
unmountRecursiveFunction · 0.92
LookupFunction · 0.85
SetTempMountLocationFunction · 0.85
UnmountRecursiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…