Returns true if the given path is valid.
(s: &str)
| 267 | |
| 268 | /// Returns true if the given path is valid. |
| 269 | fn is_path_valid(s: &str) -> bool { |
| 270 | !s.is_empty() && !s.chars().any(|c| c == ':' || c == '\\') |
| 271 | } |
| 272 | |
| 273 | /// Returns the last component of this path, or none if there is no referenced file. |
| 274 | fn leaf_name(&self) -> Option<&str> { |