in src/main/java/com/googlesource/gerrit/plugins/replication/LocalFS.java [81:97]
private static void recursivelyDelete(File dir) throws IOException {
File[] contents = dir.listFiles();
if (contents != null) {
for (File d : contents) {
if (d.isDirectory()) {
recursivelyDelete(d);
} else {
if (!d.delete()) {
throw new IOException("Failed to delete: " + d.getAbsolutePath());
}
}
}
}
if (!dir.delete()) {
throw new IOException("Failed to delete: " + dir.getAbsolutePath());
}
}