Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalPath ¶
CanonicalPath returns the absolute path with correct filesystem case. Unlike NormalizeForLookup, this preserves the actual case from the filesystem, which is important for matching paths used by external tools (e.g., Claude's project paths). On macOS, this ensures /users/foo becomes /Users/foo to match the real directory name.
Note: filepath.EvalSymlinks does NOT canonicalize case on macOS, so we walk each path component and look up the correct case from the filesystem.
func ComparePaths ¶
ComparePaths checks if two paths refer to the same location, respecting OS case sensitivity.
func Expand ¶
Expand expands home directory (~), environment variables, and git variables in a path. It returns an absolute path.
func NormalizeForLookup ¶
NormalizeForLookup creates a canonical, case-normalized path suitable for use as a map key or in comparisons. It performs the following steps: 1. Makes the path absolute. 2. Evaluates any symbolic links. 3. On case-insensitive OSes (macOS, Windows), converts the path to lowercase.
Types ¶
This section is empty.