pub fn is_subpath(base: &Path, child: &Path) -> boolExpand description
Returns true if child is a subpath of base, lexically.
This does not access the filesystem and does not resolve symlinks.
ยงExamples
use std::path::{Path, PathBuf};
use pathx::is_subpath;
let base = Path::new("/home/user/project");
let child = Path::new("/home/user/project/src/main.rs");
assert!(is_subpath(base, child));