1.流的形式
String path=file_name;
try {
Stream<Path>pathStream= Files.walk(Paths.get(path));
List<Path> file_name_ls=pathStream
.filter(Files::isRegularFile)
.collect(Collectors.toList());
System.out.println(file_name_ls);
}catch (Exception e){
e.printStackTrace();
}