MCPcopy Create free account
hub / github.com/AI45Lab/Code / matches_include_patterns

Method matches_include_patterns

core/src/context/fs_provider.rs:141–153  ·  view source on GitHub ↗
(&self, path: &Path)

Source from the content-addressed store, hash-verified

139 }
140
141 fn matches_include_patterns(&self, path: &Path) -> bool {
142 if self.config.include_patterns.is_empty() {
143 return true;
144 }
145
146 // Normalize to forward slashes for consistent cross-platform glob matching
147 let path_str = path.to_string_lossy().replace('\\', "/");
148 self.config.include_patterns.iter().any(|pattern| {
149 glob::Pattern::new(pattern)
150 .map(|p| p.matches(&path_str))
151 .unwrap_or(false)
152 })
153 }
154
155 fn matches_exclude_patterns(&self, path: &Path) -> bool {
156 // Normalize to forward slashes for consistent cross-platform glob matching

Callers 1

index_filesMethod · 0.80

Calls 2

is_emptyMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected