@Test public void testBadDuration() throws Exception { NewerThan filter = new NewerThan("-PXXX"); File file = writeFile(TempFileUtils.createTrackedFile(filter)); assertFalse(filter.accept(file)); }
@Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.after(filterDate); } catch (Exception e) { return false; } }
NewerThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.after(filterDate); } catch (Exception e) { return false; } } }
NewerThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.after(filterDate); } catch (Exception e) { return false; } } NewerThan(String s); }
NewerThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.after(filterDate); } catch (Exception e) { return false; } } NewerThan(String s); @Override boolean accept(File pathname); }
NewerThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.after(filterDate); } catch (Exception e) { return false; } } NewerThan(String s); @Override boolean accept(File pathname);  }