Documentation
¶
Overview ¶
Package pathcmp provides shared path normalization helpers used for cross-platform path comparisons. qBittorrent paths are generally forward-slashed, so we normalize using path semantics (not filepath).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAbsolute ¶ added in v1.34.0
IsAbsolute reports whether p is absolute on any client OS; filepath.IsAbs would judge qui's host.
func IsWindowsDriveAbs ¶
IsWindowsDriveAbs returns true if p is a Windows absolute path (e.g., C:/...). It requires a drive letter, colon, and forward slash. Backslashes should be normalized before calling.
func NormalizePath ¶
NormalizePath normalizes a file path for comparison by: - Converting backslashes to forward slashes - Removing trailing slashes (preserving Windows drive roots like C:/ and UNC shares) - Cleaning the path (removing . and .. where possible)
Types ¶
This section is empty.