@Test public void remove() throws IOException { java.io.File file = testFolder.newFolder(); final FileSystemPathBase path = new FileSystemPathBase(file.toString()); new DirectoryBase(path).remove(); MatcherAssert.assertThat("The directory exists", !path.exist()); }
@Override public final void remove() throws IOException { Files.walk(fileSystemPath.path(), FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.reverseOrder()) .map(Path::toFile) .forEach(java.io.File::delete); }
DirectoryBase implements Directory { @Override public final void remove() throws IOException { Files.walk(fileSystemPath.path(), FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.reverseOrder()) .map(Path::toFile) .forEach(java.io.File::delete); } }
DirectoryBase implements Directory { @Override public final void remove() throws IOException { Files.walk(fileSystemPath.path(), FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.reverseOrder()) .map(Path::toFile) .forEach(java.io.File::delete); } DirectoryBase(String path);  DirectoryBase(Path path);  DirectoryBase(FileSystemPath fileSystemPath); }
DirectoryBase implements Directory { @Override public final void remove() throws IOException { Files.walk(fileSystemPath.path(), FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.reverseOrder()) .map(Path::toFile) .forEach(java.io.File::delete); } DirectoryBase(String path);  DirectoryBase(Path path);  DirectoryBase(FileSystemPath fileSystemPath); @Override final void create(); @Override final void remove(); @Override final boolean exist(); @Override final Path path(); }
DirectoryBase implements Directory { @Override public final void remove() throws IOException { Files.walk(fileSystemPath.path(), FileVisitOption.FOLLOW_LINKS) .sorted(Comparator.reverseOrder()) .map(Path::toFile) .forEach(java.io.File::delete); } DirectoryBase(String path);  DirectoryBase(Path path);  DirectoryBase(FileSystemPath fileSystemPath); @Override final void create(); @Override final void remove(); @Override final boolean exist(); @Override final Path path();  }