MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / canonicalize_path

Method canonicalize_path

rust/src/lib.rs:1518–1537  ·  view source on GitHub ↗
(&self, path_buf: PathBuf)

Source from the content-addressed store, hash-verified

1516 }
1517
1518 fn canonicalize_path(&self, path_buf: PathBuf) -> String {
1519 let mut canon_path = path_to_string(&path_buf);
1520 if WINDOWS.is(self.get_os()) || canon_path.starts_with(UNC_PREFIX) {
1521 canon_path = path_to_string(
1522 &path_buf
1523 .as_path()
1524 .canonicalize()
1525 .unwrap_or(path_buf.clone()),
1526 )
1527 .replace(UNC_PREFIX, "")
1528 }
1529 if !path_to_string(&path_buf).eq(&canon_path) {
1530 self.get_logger().trace(format!(
1531 "Path {} has been canonicalized to {}",
1532 path_buf.display(),
1533 canon_path
1534 ));
1535 }
1536 canon_path
1537 }
1538
1539 fn get_escaped_path(&self, string_path: String) -> String {
1540 let mut escaped_path = string_path.clone();

Callers 3

detect_browser_pathMethod · 0.80
get_escaped_pathMethod · 0.80
get_cache_pathMethod · 0.80

Implementers 8

edge.rsrust/src/edge.rs
iexplorer.rsrust/src/iexplorer.rs
safaritp.rsrust/src/safaritp.rs
electron.rsrust/src/electron.rs
chrome.rsrust/src/chrome.rs
firefox.rsrust/src/firefox.rs
grid.rsrust/src/grid.rs
safari.rsrust/src/safari.rs

Calls 5

path_to_stringFunction · 0.85
get_osMethod · 0.80
traceMethod · 0.80
isMethod · 0.65
get_loggerMethod · 0.45

Tested by

no test coverage detected