Skip to main content

slash_key

Function slash_key 

Source
pub fn slash_key(path: &Path) -> PathBuf
Expand description

A path as an in-memory project key: its components joined with /.

analyse_in_memory_project’s keys are /-separated on every platform (they come from the web extension, which speaks URIs). The project model builds identity paths with PathBuf::join, which inserts \ on Windows (src + app/web.bynk is src\app/web.bynk there), so every path handed back is rebuilt this way, and keys taken in are too. On Unix a \ is an ordinary file-name character, not a separator, and is kept.