Documentation
¶
Overview ¶
Package pathutil provides shared path sanitization utilities for user-controlled path components used in filesystem operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SafePathComponent ¶
SafePathComponent sanitizes a string for safe use as a single path component. It strips directory separators, path traversal sequences, null bytes, and other characters that are problematic in filenames. The result is safe to embed in filepath.Join calls without risk of path traversal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.