Check if a path matches the prefix filter. # Arguments `path` - Path to check # Returns `true` if the path is under the prefix. # Example ```rust use atomic_core::output::repo::TreeCollectOptions; let opts = TreeCollectOptions::new().prefix("src/"); assert!(opts.matches_prefix("src/main.rs")); assert!(opts.matches_prefix("src/lib/mod.rs")); assert!(!opts.matches_prefix("tests/test.rs")); ``
(&self, path: &str)
| 292 | /// assert!(!opts.matches_prefix("tests/test.rs")); |
| 293 | /// ``` |
| 294 | pub fn matches_prefix(&self, path: &str) -> bool { |
| 295 | if self.prefix.is_empty() { |
| 296 | true |
| 297 | } else { |
| 298 | path.starts_with(&self.prefix) |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | /// Check if a path should be excluded. |
| 303 | /// |
no test coverage detected