@Test public void testAccept() { assertTrue(new DownloadGlobFilter("*.css").accept(new Path("/dir/f.css", EnumSet.of(Path.Type.file)))); assertFalse(new DownloadGlobFilter("*.css").accept(new Path("/dir/f.png", EnumSet.of(Path.Type.file)))); }
@Override public boolean accept(final Path file) { if(!super.accept(file)) { return false; } if(pattern.matcher(file.getName()).matches()) { return true; } if(log.isDebugEnabled()) { log.debug(String.format("Skip %s excluded with regex", file.getAbsolute())); } return false; }
DownloadGlobFilter extends DownloadDuplicateFilter { @Override public boolean accept(final Path file) { if(!super.accept(file)) { return false; } if(pattern.matcher(file.getName()).matches()) { return true; } if(log.isDebugEnabled()) { log.debug(String.format("Skip %s excluded with regex", file.getAbsolute())); } return false; } }
DownloadGlobFilter extends DownloadDuplicateFilter { @Override public boolean accept(final Path file) { if(!super.accept(file)) { return false; } if(pattern.matcher(file.getName()).matches()) { return true; } if(log.isDebugEnabled()) { log.debug(String.format("Skip %s excluded with regex", file.getAbsolute())); } return false; } DownloadGlobFilter(final String glob); }
DownloadGlobFilter extends DownloadDuplicateFilter { @Override public boolean accept(final Path file) { if(!super.accept(file)) { return false; } if(pattern.matcher(file.getName()).matches()) { return true; } if(log.isDebugEnabled()) { log.debug(String.format("Skip %s excluded with regex", file.getAbsolute())); } return false; } DownloadGlobFilter(final String glob); @Override boolean accept(final Path file); @Override Pattern toPattern(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode(); }
DownloadGlobFilter extends DownloadDuplicateFilter { @Override public boolean accept(final Path file) { if(!super.accept(file)) { return false; } if(pattern.matcher(file.getName()).matches()) { return true; } if(log.isDebugEnabled()) { log.debug(String.format("Skip %s excluded with regex", file.getAbsolute())); } return false; } DownloadGlobFilter(final String glob); @Override boolean accept(final Path file); @Override Pattern toPattern(); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode();  }