use of org.apache.tools.ant.types.FileSet in project ceylon-compiler by ceylon.
the class CeylonCompileAntTask method addToCompileList.
private void addToCompileList(List<File> dirs) {
for (File srcDir : dirs) {
if (srcDir.isDirectory()) {
FileSet fs = (FileSet) this.files.clone();
fs.setDir(srcDir);
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
String[] files = ds.getIncludedFiles();
for (String fileName : files) compileList.add(new File(srcDir, fileName));
}
}
}
use of org.apache.tools.ant.types.FileSet in project processdash by dtuma.
the class PackageLaunchProfile method calculateContentToken.
private String calculateContentToken() throws IOException {
List<File> files = new ArrayList<File>();
for (FileSet fs : filesets) {
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
for (String name : ds.getIncludedFiles()) files.add(new File(ds.getBasedir(), name));
}
if (files.isEmpty())
throw new BuildException("You must designate at least one file " + "to include in the launch profile.");
Collections.sort(files, FILENAME_SORTER);
Checksum ck = new Adler32();
for (File f : files) calcChecksum(f, ck);
return Long.toString(Math.abs(ck.getValue()), Character.MAX_RADIX);
}
Aggregations