paths

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package paths handles paths recorded by agents on a different operating system from the ctx process reading them. Session history can outlive a WSL to Windows move, so filepath alone is not sufficient.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanSlash

func CleanSlash(p string) string

CleanSlash returns the stable slash-separated form used in the database. path.Clean is deliberately used after separator normalization so its result does not depend on the host OS.

func IsAbs

func IsAbs(p string) bool

IsAbs recognizes native, POSIX, drive-letter, and UNC absolute paths.

func RelIfWithin

func RelIfWithin(base, target string) (string, bool)

RelIfWithin lexically rebases target under base using portable separators. It is intended for foreign or missing paths, where filepath.Rel cannot be used. Windows drive and UNC comparisons are case-insensitive.

func ToHost

func ToHost(p string) (string, bool)

ToHost maps the path convention shared by Windows and WSL to the current host. It returns false for paths without a safe, mechanical mapping (for example /home on Windows or UNC on Linux).

Types

This section is empty.

Jump to

Keyboard shortcuts

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