CanonicalizePath makes path absolute and resolves symlinks in it. Path must exist.
(path string)
| 78 | // CanonicalizePath makes path absolute and resolves symlinks in it. |
| 79 | // Path must exist. |
| 80 | func 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…