Skip to main content

relative_path

Function relative_path 

Source
pub fn relative_path(file: &Path, root: &Path) -> String
Expand description

Normalize a finding’s path so that scan ., scan ./src and scan /abs/path all hash to the same string.

Both sides are canonicalized when possible; otherwise the raw paths are used. The result always uses / separators so a baseline stays valid across platforms.