in src/main/java/com/googlesource/gerrit/plugins/events/fsstore/Fs.java [57:78]
public static boolean tryRecursiveDelete(Path dir) {
try {
Files.walkFileTree(
dir,
new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
tryDelete(file);
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException {
tryDelete(dir);
return FileVisitResult.CONTINUE;
}
});
} catch (IOException e) { // Intent of 'try' function is to ignore these.
}
return !Files.exists(dir);
}