pub fn normalize_to_root(path: &Path) -> Option<PathBuf>Expand description
Find the project root for path by walking up until a marker is found.
- If
pathitself is a directory containing a marker, it is its own root. - Otherwise we walk up ancestors looking for the first directory that contains a marker.
- Returns
Noneif no marker is found within the filesystem (e.g. the path doesn’t exist, or it’s a loose file with no project context).