paths

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 3 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 checks the relative paths servers use for files inside their folder. The schemas reject the obvious escapes; this adds the Windows rules a regular expression can't express well.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(path string) error

Check reports whether path is safe to use under a server folder: relative, forward slashes only, and no part that climbs out, is empty, names a device or that Windows would silently rename.

func CheckPattern

func CheckPattern(pattern string) error

CheckPattern is Check for a file pattern: * and ? may appear in the last segment, which must also name something, so a pattern can't take a whole folder.

func Key

func Key(path string) string

Key is the form two paths are compared in. Windows paths are case-insensitive, so "Game.exe" and "game.exe" are the same file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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