Skip to main content

Module paths

Module paths 

Source

Enums§

PathScope
Enumeration describing the conceptual scope of a file path.

Traits§

PathResolver
Helper trait that adds path resolution helpers on top of WorkspacePaths.
WorkspacePaths
Provides the root directories an application uses to store data.

Functions§

canonicalize_workspace
Canonicalize a path with fallback to the original path if canonicalization fails.
file_name_from_path
Extract the filename from a path, with fallback to the full path.
is_safe_relative_path
Check if a path string is a safe relative path (no traversal, no absolute).
normalize_path
Normalize a path by resolving . and .. components lexically.
secure_path
Return a canonicalised absolute path that is guaranteed to reside inside the provided workspace_root. If the path is outside the workspace an error is returned.