PathResolver

Trait PathResolver 

Source
pub trait PathResolver: Send + Sync {
    // Required method
    fn resolve(&self, path: &str) -> Result<PathBuf, ToolError>;
}
Expand description

Strategy for resolving and validating file paths.

Implementations control whether paths must be absolute, relative to allowed directories, or follow other constraints.

Required Methods§

Source

fn resolve(&self, path: &str) -> Result<PathBuf, ToolError>

Resolves and validates a path string.

Returns an absolute path (may or may not be canonical) if valid, or an error describing the issue.

Implementors§