Skip to main content

escape_path

Function escape_path 

Source
pub fn escape_path(path: &str) -> String
Expand description

Escape ., [, and \ in a path segment so it is treated literally.

assert_eq!(escape_path("foo.bar"), "foo\\.bar");