File file = new File("f:\\新建文件夹\\电影");
String[] str = file.list(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
File file = new File(dir,name);
return file.isFile()&&name.endsWith(".mp4");
}
});
for (String fileString: str) {
System.out.println(fileString);
} |
|