Documentation
¶
Overview ¶
Package pathutil holds boundary-safe path predicates over filesystem paths. Comparisons canonicalise both sides (clean + symlink-resolve) then use an explicit separator boundary so "/a/bc" is never nested under "/a/b".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Canonical ¶
Canonical cleans abs and symlink-resolves the longest existing prefix so that macOS /var vs /private/var (and other symlink spellings of the same directory) collapse to one form. A missing tail is rejoined after the resolved prefix. Callers should pass an absolute path; relative inputs are cleaned only.
func Overlap ¶
Overlap reports whether a and b are equal or one is nested within the other (both sides canonicalised).
func UnderOrEqual ¶
UnderOrEqual reports whether child is the same as ancestor or lies within it after both paths are canonicalised, on a path-separator boundary.
Types ¶
This section is empty.