pub fn contains_component_path(path: &Path, needle: &Path) -> boolExpand description
Returns whether path contains needle as a contiguous component path.
This is useful for relative metadata protections such as .git or
.cache. The comparison uses the same native component semantics as
paths_equal and is_within. It is lexical only and does not inspect
the filesystem.