safe_relative_path

Function safe_relative_path 

Source
pub fn safe_relative_path(base: &Path, target: &Path) -> Result<PathBuf>
Expand description

Creates a safe relative path from a base directory.

§Arguments

  • base - The base directory
  • target - The target path

§Returns

A relative path from base to target, or None if not possible