I am trying to filter files that were created more recent than another file. I just don't get how to apply the methods from Files
directly to the stream.
Is there a neater way to do it?, I know it does not help readability to use Streams for the application but Im trying to learn to use it.
try (Stream<Path> stream = Files.walk(dir,1)) {
res = stream.filter(Files::isDirectory).filter(
f->Files.getAttribute(f,"creationTime")>
Files.getAttribute(reference, "creationTime"))
.collect(Collectors.toList());
}