摘要:
java中有一个FilenameFilter的接口,能够过滤得到指定类型的文件或者目录,其中必须重写accept(File file,String path)方法public class DirFilter implements FilenameFilter{ private String type; public DirFilter(String tp){ this.type=tp; } public boolean accept(File fl,String path) throws Exception{ File file=new File(path); S 阅读全文