< prev index next > bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/WebrevStorage.java
Print this page
var batchIndex = new AtomicInteger();
try (var files = Files.walk(webrevFolder)) {
// Try to push 1000 files at a time
var batches = files.filter(Files::isRegularFile)
.filter(file -> {
! // Huge files are not that useful in a webrev
try {
! return Files.size(file) < 1000 * 1000;
} catch (IOException e) {
return false;
}
})
.collect(Collectors.groupingBy(path -> {
var batchIndex = new AtomicInteger();
try (var files = Files.walk(webrevFolder)) {
// Try to push 1000 files at a time
var batches = files.filter(Files::isRegularFile)
.filter(file -> {
! // Huge files are not that useful in a webrev - but make an exception for the index
try {
! if (file.getFileName().toString().equals("index.html")) {
+ return true;
+ } else {
+ return Files.size(file) < 1000 * 1000;
+ }
} catch (IOException e) {
return false;
}
})
.collect(Collectors.groupingBy(path -> {
< prev index next >