Answer the question
In order to leave comments, you need to log in
What is wrong in the Stream API expression?
Good afternoon, please tell me what is wrong in the Stream api statement.
I want to get a list of files from a certain directory with a certain permission, for example jpg.
List<File> pathFiles = Files.walk(startURI).filter(Files::isRegularFile)
.filter(x-> x.endsWith(".jpg"))
.map(Path::toFile).collect(Collectors.toList());
.filter(x-> x.endsWith(".jpg"))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question