MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / contains

Method contains

crates/opencode-util/src/filesystem.rs:53–58  ·  view source on GitHub ↗
(parent: &str, child: &str)

Source from the content-addressed store, hash-verified

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();

Callers 15

synthetic_variant_namesFunction · 0.80
find_recursiveFunction · 0.80
is_extra_allowed_originFunction · 0.80
load_globalMethod · 0.80
load_allMethod · 0.80
fallback_sanitize_yamlFunction · 0.80
parse_yaml_list_linesFunction · 0.80
append_unique_keep_orderFunction · 0.80
watchMethod · 0.80
is_watchingMethod · 0.80

Calls 1

newFunction · 0.85

Tested by

no test coverage detected