validate_project_path

Function validate_project_path 

Source
pub fn validate_project_path(path: &Path, project_dir: &Path) -> Result<PathBuf>
Expand description

Validates that a path is safe and within project boundaries.

§Arguments

  • path - The path to validate
  • project_dir - The project root directory

§Returns

The canonicalized path if valid

§Errors

Returns an error if:

  • The path doesn’t exist
  • The path escapes the project directory
  • The path cannot be canonicalized