}
final Pattern toMatch = Pattern
.compile(dirToProcess.replaceAll("\\\\\\\\", "\\\\"));
File[] matches = directory.listFiles(new FilenameFilter() {
public boolean accept(File arg0, String arg1) {
return toMatch.matcher(arg1).matches();
}
});
if (matches == null || matches.length == 0)
return null;
directory = matches[0];
if (!directory.exists())
return null;
} // End process directory information
}
// Last step check if the given file can be found in this directory
String filenameToLookFor = expandBrackets(fileParts[fileParts.length - 1], entry, database);
final Pattern toMatch = Pattern.compile("^"
+ filenameToLookFor.replaceAll("\\\\\\\\", "\\\\") + "$");
File[] matches = directory.listFiles(new FilenameFilter() {
public boolean accept(File arg0, String arg1) {
return toMatch.matcher(arg1).matches();
}
});
if (matches == null || matches.length == 0)