pathcmp

package
v1.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: GPL-2.0 Imports: 2 Imported by: 0

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 IsWindowsDriveAbs

func IsWindowsDriveAbs(p string) bool

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

func NormalizePath(p string) string

NormalizePath normalizes a file path for comparison by: - Converting backslashes to forward slashes - Removing trailing slashes (preserving Windows drive roots like C:/) - Cleaning the path (removing . and .. where possible)

func NormalizePathFold

func NormalizePathFold(p string) string

NormalizePathFold is a case-folded version of NormalizePath for case-insensitive comparisons.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL