Skip to main content

source_base_path

Function source_base_path 

Source
pub fn source_base_path(source: &Source, workspace_root: &Path) -> PathBuf
Expand description

The on-disk base directory a path-based primary source resolves to: the source pointer joined onto the workspace root (Path::join yields the pointer verbatim when it is absolute), or the workspace root itself for an empty pointer. Only meaningful for path-namespaced mediums (codebase / filesystem / git) — a graph pointer is a mem id and a web pointer a URL.