Skip to main content

safe_join

Function safe_join 

Source
pub fn safe_join(base: &Path, name: &str) -> Result<PathBuf, PathSafetyError>
Expand description

Join a single untrusted name onto base, guaranteeing the result is a direct child of base.

ยงErrors

Returns a PathSafetyError if name is not a safe single component (see validate_component).