@Test public void testAbsolute() throws Exception { Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_YEAR, +1); OlderThan filter = new OlderThan("" + c.getTime().getTime()); File file = writeFile(TempFileUtils.createTrackedFile(filter)); assertTrue(filter.accept(file)); }
@Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.before(filterDate); } catch (Exception e) { return false; } }
OlderThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.before(filterDate); } catch (Exception e) { return false; } } }
OlderThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.before(filterDate); } catch (Exception e) { return false; } } OlderThan(String s); }
OlderThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.before(filterDate); } catch (Exception e) { return false; } } OlderThan(String s); @Override boolean accept(File pathname); }
OlderThan extends LastModifiedFilter { @Override public boolean accept(File pathname) { try { Date filterDate = filterDate(); Date fileDate = new Date(pathname.lastModified()); return fileDate.before(filterDate); } catch (Exception e) { return false; } } OlderThan(String s); @Override boolean accept(File pathname);  }