}
private String[] getIncludedFiles(String absPath, String[] excludes,
String[] includes) {
FileSetManager fileSetManager = new FileSetManager();
FileSet fs = new FileSet();
fs.setDirectory(absPath);
fs.setFollowSymlinks(false);
//exclude imports directory since it has already been compiled.
if (imports != null) {
String importExclude = null;
for (String importFile : this.imports) {
File file = new File(importFile);
if (file.isDirectory()) {
importExclude = file.getName() + "/**";
} else if (file.isFile()) {
importExclude = "**/" + file.getName();
}
fs.addExclude(importExclude);
}
}
for (String include : includes) {
fs.addInclude(include);
}
for (String exclude : excludes) {
fs.addExclude(exclude);
}
return fileSetManager.getIncludedFiles(fs);
}