ensure_within_directory

Function ensure_within_directory 

Source
pub fn ensure_within_directory(path: &Path, boundary: &Path) -> Result<bool>
Expand description

Ensures a path is within a specific directory boundary.

§Arguments

  • path - The path to check
  • boundary - The boundary directory

§Returns

true if the path is within the boundary