Documentation
¶
Overview ¶
Package canonicalpath resolves filesystem paths to absolute, symlink-free paths with on-disk component casing. It does not enforce confinement or write trust state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
Resolve returns the canonical filesystem path of path, whether it names a file or a directory. Relative paths resolve against the process's current directory; empty input means the current directory. Symlinks are followed, then each component is rewritten to its on-disk spelling on a best-effort basis. Exact-case matches win; only a unique strings.EqualFold match changes spelling. Unreadable directories and absent or ambiguous matches retain the input component.
Resolution failures return an empty path and wrap the underlying error, preserving errors.Is identity, including fs.ErrNotExist and fs.ErrPermission.
Types ¶
This section is empty.