Function sanitize_relative_path
pub fn sanitize_relative_path(
path: impl AsRef<Path>,
) -> Result<PathBuf, UnsafePathError>Available on crate feature
std only.Expand description
Like sanitize_path but additionally requires the path to be relative,
rejecting absolute paths and drive/UNC prefixes (UnsafePathError::Absolute).
Returns the cleaned relative path with . components dropped; join it onto
a trusted root directory to confine filesystem access to within that root.