Skip to main content

safe_join

Function safe_join 

Source
pub fn safe_join(project_root: &Path, file_path: &str) -> AppResult<PathBuf>
Expand description

Joins a relative path to a project root, normalizes, and ensures it stays within the root. The project root must exist (canonicalized). The file path may not exist yet.