@Test void shouldJustContinue() throws IOException { assertThat( FileVisitors.justContinue().preVisitDirectory( null, null ), is( FileVisitResult.CONTINUE ) ); assertThat( FileVisitors.justContinue().visitFile( null, null ), is( FileVisitResult.CONTINUE ) ); assertThat( FileVisitors.justContinue().visitFileFailed( null, null ), is( FileVisitResult.CONTINUE ) ); assertThat( FileVisitors.justContinue().postVisitDirectory( null, null ), is( FileVisitResult.CONTINUE ) ); } }
private void visitPath( Path transactionalLogsPath, Predicate<Path> exclude, ArchiveOutputStream stream ) throws IOException { Files.walkFileTree( transactionalLogsPath, onlyMatching( not( exclude ), throwExceptions( onDirectory( dir -> dumpDirectory( transactionalLogsPath, stream, dir ), onFile( file -> dumpFile( transactionalLogsPath, stream, file ), justContinue() ) ) ) ) ); }
private void visitPath( Path transactionalLogsPath, Predicate<Path> exclude, ArchiveOutputStream stream ) throws IOException { Files.walkFileTree( transactionalLogsPath, onlyMatching( not( exclude ), throwExceptions( onDirectory( dir -> dumpDirectory( transactionalLogsPath, stream, dir ), onFile( file -> dumpFile( transactionalLogsPath, stream, file ), justContinue() ) ) ) ) ); }