xxxxxxxxxx
public static List<Path> listFiles(Path path) throws IOException {
List<Path> result;
try (Stream<Path> walk = Files.walk(path)) {
result = walk.filter(Files::isRegularFile)
.collect(Collectors.toList());
}
return result;
}