/** Get the primary file. * By default, only accepts files, not folders. * @param fo the file to find the primary file for * * @return the primary file, or <code>null</code> if its extension is not {@link #getExtensions recognized} */ protected FileObject findPrimaryFile (FileObject fo) { // never recognize folders if (fo.isFolder()) return null; return getExtensions().isRegistered(fo) ? fo : null; }
@Override public boolean accept(FileObject pathname) { return !specialFile(pathname) && (exts.isRegistered(pathname.getNameExt()) || pathname.isFolder() || isHeaderFileWoExt(pathname)); } }