(parent: &str, child: &str)
| 51 | } |
| 52 | |
| 53 | pub fn contains(parent: &str, child: &str) -> bool { |
| 54 | let parent_path = Path::new(parent); |
| 55 | let child_path = Path::new(child); |
| 56 | |
| 57 | child_path.strip_prefix(parent_path).is_ok() |
| 58 | } |
| 59 | |
| 60 | pub async fn find_up<P: AsRef<Path>>(target: &str, start: P, stop: Option<P>) -> Vec<PathBuf> { |
| 61 | let mut current = start.as_ref().to_path_buf(); |
no test coverage detected