I like new Java8 StreamAPI and want use it not only for one file. As usually, I use this code:
Stream lines = Files.lines(Paths.get(\"/somepat
You can use following code
Files.list(Paths.get("path")) .filter(Files::isRegularFile) .flatMap(s -> { try { return Files.lines(s); } catch (IOException e) { e.printStackTrace(); } return null; }) .forEach(System.out::println);