This class is used to locate files with the specified set of root search directories.
The root directorities and all of its sub folders will be searched for the specified file.
This has been optimized not to search the same directories if the several root paths intersect.
It currently does not support wildcard charaters in the filename parameter.
Example
FindFiles x = new FindFiles( System.getProperty("java.class.path") , "ComponentDefinition.xml");
List files = x.getList();
if(files == null)
System.out.println("No Files Found");
else {
for(Iterator it = files.iterator(); it.hasNext();) {
File file = (File) it.next();
System.out.println( file.getPath() );
}
System.out.println(files.size() + " File(s) Found");
}
author: PaulE version: 1.0 |