📅  最后修改于: 2022-03-11 14:52:28.463000             🧑  作者: Mango
File folder = new File("/Users/you/folder/");
File[] listOfFiles = folder.listFiles();
for (File file : listOfFiles) {
if (file.isFile()) {
System.out.println(file.getName());
}
}