use of org.apache.commons.io.filefilter.WildcardFileFilter in project asterixdb by apache.
the class InputHandlerTest method cleanDiskFiles.
private void cleanDiskFiles() throws IOException {
String filePrefix = "dataverse.feed(Feed)_dataset*";
Collection<File> files = FileUtils.listFiles(new File("."), new WildcardFileFilter(filePrefix), null);
for (File ifile : files) {
Files.deleteIfExists(ifile.toPath());
}
}
use of org.apache.commons.io.filefilter.WildcardFileFilter in project github-version-statistics by centic9.
the class ProcessResults method main.
public static void main(String[] args) throws IOException, ParseException {
// read stats
File[] files = JSONWriter.STATS_DIR.listFiles((FilenameFilter) new WildcardFileFilter("stats*.json"));
Preconditions.checkNotNull(files);
Arrays.sort(files);
Table<String, String, Data> values = HashBasedTable.create();
Table<String, String, Data> valuesAccumulative = HashBasedTable.create();
List<VersionChange> changes = new ArrayList<>();
// repo as key, highest seen version as value
Map<String, String> seenRepositoryVersions = new HashMap<>();
String maxDateStr = readLines(files, values, valuesAccumulative, changes, seenRepositoryVersions);
File results = new File("docs", "results.html");
generateHtmlFiles(values, maxDateStr, results);
File resultsAll = new File("docs", "resultsAll.html");
generateHtmlFiles(valuesAccumulative, maxDateStr, resultsAll);
File current = new File("docs", "resultsCurrent.csv");
writeCurrentResults(current, values.row(maxDateStr));
File all = new File("docs", "resultsAll.csv");
writeAllResults(all, values.row(maxDateStr), seenRepositoryVersions, readRepositories(files[files.length - 1]));
File changesFile = new File("docs/_data", "versionChanges.csv");
writeVersionChanges(changesFile, changes);
System.out.println("Wrote results to " + results + ", " + current + " and " + all);
}
Aggregations