📅  最后修改于: 2022-03-11 14:52:47.953000             🧑  作者: Mango
File dir = new File(directory);
File[] matches = dir.listFiles(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.startsWith("temp") && name.endsWith(".txt");
}
});