@Test public void does_not_match_included_but_also_excluded_patterns() { IncludeExcludePathMatcher matcher = new IncludeExcludePathMatcher(FileSystems.getDefault(), "glob:*.txt", "glob:bar*"); assertThat(matcher, matches(Paths.get("foo.txt"))); assertThat(matcher, not(matches(Paths.get("bar.txt")))); }
@Override public boolean matches(Path path) { return included.matches(path) && !excluded.matches(path); }
IncludeExcludePathMatcher implements PathMatcher { @Override public boolean matches(Path path) { return included.matches(path) && !excluded.matches(path); } }
IncludeExcludePathMatcher implements PathMatcher { @Override public boolean matches(Path path) { return included.matches(path) && !excluded.matches(path); } IncludeExcludePathMatcher(FileSystem fileSystem, String includedPattern, String excludedPattern); }
IncludeExcludePathMatcher implements PathMatcher { @Override public boolean matches(Path path) { return included.matches(path) && !excluded.matches(path); } IncludeExcludePathMatcher(FileSystem fileSystem, String includedPattern, String excludedPattern); @Override boolean matches(Path path); @Override String toString(); }
IncludeExcludePathMatcher implements PathMatcher { @Override public boolean matches(Path path) { return included.matches(path) && !excluded.matches(path); } IncludeExcludePathMatcher(FileSystem fileSystem, String includedPattern, String excludedPattern); @Override boolean matches(Path path); @Override String toString();  }