I'd like to use NIO.2 features with Scala (classes are in java.nio.file):
In Java I would do:
Files.newDirectoryStream(Paths.get("/tmp"), new DirectoryStream.Filter<Path>() {
@Override
public boolean accept(Path entry) throws IOException {
return false;
}
});
How can I do same in Scala? The Fitler is static interface insideDirectoryStream interface.
Thank you.
EDIT: Please do not reply if you want to suggest me another library/method for listing files. I'm mainly interested in the main problem.