in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java [108:123]
public static boolean isAllEntriesOlderThan(Path dir, FileTime expiry) throws IOException {
if (!isOlderThan(dir, expiry)) {
return false;
}
try (DirectoryStream<Path> dirEntries = Files.newDirectoryStream(dir)) {
for (Path path : dirEntries) {
if (!isAllEntriesOlderThan(path, expiry)) {
return false;
}
}
} catch (NotDirectoryException e) { // can't recurse if not a directory
} catch (DirectoryIteratorException e) {
throw e.getCause(); // Throw the causal checked exception
}
return true;
}