Skip to main content

Crate perl_path_security

Crate perl_path_security 

Source
Expand description

Workspace-bound path validation and traversal prevention.

This crate centralizes path-boundary checks used by tooling that accepts user-provided file paths (for example LSP/DAP requests).

Enums§

WorkspacePathError
Path validation errors for workspace-bound operations.

Functions§

build_completion_path
Build completion path string and append trailing slash for directories.
is_hidden_or_forbidden_entry_name
Check whether a filename should be skipped during file completion traversal.
is_safe_completion_filename
Validate filename safety for completion entries.
resolve_completion_base_directory
Resolve a directory used for file completion traversal.
sanitize_completion_path_input
Sanitize and normalize user-provided completion path input.
split_completion_path_components
Split sanitized completion path into (directory_part, file_prefix).
validate_workspace_path
Validate and normalize a path so it remains within workspace_root.