java 文件过滤
public class TestFileio {
public static void main(String[] args) {
File file = new File("D:/uploads");
if (file.isDirectory()) {
File[] files = file.listFiles(f->f.isFile());
for (File file1 : files) {
System.out.println(file1.getName());
}
}
}
}
技术改变一切