MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / should_include

Method should_include

atomic-repository/src/archive.rs:382–403  ·  view source on GitHub ↗

Check if a path should be included based on patterns.

(&self, path: &str)

Source from the content-addressed store, hash-verified

380
381 /// Check if a path should be included based on patterns.
382 pub fn should_include(&self, path: &str) -> bool {
383 // Check exclude patterns first
384 for pattern in &self.exclude {
385 if matches_glob(path, pattern) {
386 return false;
387 }
388 }
389
390 // If no include patterns, include everything
391 if self.include.is_empty() {
392 return true;
393 }
394
395 // Check include patterns
396 for pattern in &self.include {
397 if matches_glob(path, pattern) {
398 return true;
399 }
400 }
401
402 false
403 }
404}
405
406// Archive Manifest

Callers

nothing calls this directly

Calls 2

matches_globFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected