public static java.io.File | locateFile(java.util.List loadpaths, java.lang.String filename)Given an ordered list of directories to look in, locate the specified file.
Returns null if file not found.
if (filename == null) {
throw new NullPointerException("No filename provided");
}
if (loadpaths == null) {
throw new NullPointerException("No loadpaths provided.");
}
for (String path : loadpaths) {
File file = new File(path, filename);
if (file.exists()) {
return file;
}
}
return null;
|