private FileFilter createConfigFilesFilter ( ) { SiteConfig config = site . getConfig ( ) ; boolean useDefaultConfigFiles = config . useDefaultConfigFiles ( ) ; if ( useDefaultConfigFiles ) { log . debug ( "Using default config files." ) ; return SiteConfigImpl . DEFAULT_CONFIG_FILES_FILTER ; } else { //custom config files final File [ ] configFiles = config . getConfigFiles ( ) ; return new FileFilter ( ) { @ Override public boolean accept ( File file ) { for ( File configFile : configFiles ) { if ( configFile . equals ( file ) ) { return true ; } } return false ; } } ; } }
Create config files FileFilter .