Code example for FileFilter

Methods: accept

0
            this.filter = filter!=null ? filter : PASS_THROUGH;
            this.visitor = visitor;
        } 
 
        public void visit(File f, String relativePath) throws IOException {
            if(f.isDirectory() || filter.accept(f))
                visitor.visit(f,relativePath);
        } 
 
        private static final FileFilter PASS_THROUGH = new FileFilter() {
            public boolean accept(File pathname) { 
                return true; 
            } 
        }; 
 
        private static final long serialVersionUID = 1L;
    } 
}