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

Method canonicalize_path

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

Source from the content-addressed store, hash-verified

1498 }
1499
1500 fn canonicalize_path(&self, path_buf: PathBuf) -> String {
1501 let mut canon_path = path_to_string(&path_buf);
1502 if WINDOWS.is(self.get_os()) || canon_path.starts_with(UNC_PREFIX) {
1503 canon_path = path_to_string(
1504 &path_buf
1505 .as_path()
1506 .canonicalize()
1507 .unwrap_or(path_buf.clone()),
1508 )
1509 .replace(UNC_PREFIX, "")
1510 }
1511 if !path_to_string(&path_buf).eq(&canon_path) {
1512 self.get_logger().trace(format!(
1513 "Path {} has been canonicalized to {}",
1514 path_buf.display(),
1515 canon_path
1516 ));
1517 }
1518 canon_path
1519 }
1520
1521 fn get_escaped_path(&self, string_path: String) -> String {
1522 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