Public Member Functions | |
ConfigFileFinder () throws Exception | |
void | configureRedeemers () throws Exception |
void | addRedeemer (ConfigFileRedeemer redeemer) |
void | configureFromArgs (String[] args) |
void | checkConfiguration () throws IllegalStateException |
Static Public Member Functions | |
void | main (String[] args) |
Protected Member Functions | |
void | handleConfigFile (File configFile) |
void | setBaseDir (File baseDir) |
void | setTargetDir (File targetDir) |
void | addFileEndings (String[] moreFileEndings) |
Private Member Functions | |
void | run () |
void | runRecursive (File currentDir, FileFilter fileFilter) |
Private Attributes | |
Logger | logger |
File | baseDir |
File | targetDir |
Set< String > | fileEndings = new HashSet<String>() |
boolean | targetFilesFlat |
List< ConfigFileRedeemer > | redeemers = new ArrayList<ConfigFileRedeemer>() |
All files in and below the directory given by the option -baseDir
are scanned. Those files with certain endings are suspected of being configuration files, but then some of these files get cleared if they are recognized by one of the filters which check all suspicious files. For example, a filter specialized in xml files will recognize those files used for ACS error definitions. All files that are still suspect after filtering will be reported, either by printing their pathname to stdout, or by copying them to a target directory if the -targetDir
option is given.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gets all Files under baseDir whose name ends with any of the Strings given in fileEndings, and runs them through the filter chain to suppress files of known and safe content.
|
|
|
|
|
|
|
|
directory under which we look for config files |
|
endings of files to consider, e.g. {"xml", "properties"} |
|
|
|
classes that can recognize specific suspect files and state that they are actually not config files |
|
optional target dir to which suspected config files are copied |
|
should files be copied to targetDir flat, i.e. w/o subdir structure? |