Check if a path should be excluded. # Arguments `path` - Path to check # Returns `true` if the path matches any exclude pattern. # Example ```rust use atomic_core::output::repo::TreeCollectOptions; let opts = TreeCollectOptions::new().exclude("target/"); assert!(opts.is_excluded("target/debug/main")); assert!(!opts.is_excluded("src/main.rs")); ```
(&self, path: &str)
| 319 | /// assert!(!opts.is_excluded("src/main.rs")); |
| 320 | /// ``` |
| 321 | pub fn is_excluded(&self, path: &str) -> bool { |
| 322 | for pattern in &self.exclude_patterns { |
| 323 | if path.starts_with(pattern) || path.contains(pattern) { |
| 324 | return true; |
| 325 | } |
| 326 | } |
| 327 | false |
| 328 | } |
| 329 | |
| 330 | /// Check if a filename is hidden. |
| 331 | /// |
no test coverage detected