ApplicationFile implements Comparable<ApplicationFile> { protected ApplicationFile(Path path) { this.path = path; } protected  ApplicationFile(Path path); abstract boolean isDirectory(); abstract boolean exists(); abstract Reader createReader(); abstract InputStream createInputStream(); abstract ApplicationFile createDirectory(); abstract ApplicationFile writeFile(Reader input); abstract ApplicationFile appendFile(String value); List<ApplicationFile> listFiles(); abstract List<ApplicationFile> listFiles(PathFilter filter); List<ApplicationFile> listFiles(boolean recurse); abstract ApplicationFile delete(); Path getPath(); @Override String toString(); @Override boolean equals(Object other); abstract MetaData getMetaData(); static final String ContentStatusNew; static final String ContentStatusChanged; static final String ContentStatusDeleted; }
@Test public void testApplicationFile() throws Exception { Path p1 = Path.fromString("foo/bar/baz"); ApplicationFile f1 = getApplicationFile(p1); ApplicationFile f2 = getApplicationFile(p1); assertEquals(p1, f1.getPath()); assertEquals(p1, f2.getPath()); }