smengcl commented on code in PR #4360:
URL: https://github.com/apache/ozone/pull/4360#discussion_r1136328724
##########
hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java:
##########
@@ -293,6 +293,21 @@ public static <K, V> Map<V, K> getReverseMap(Map<K,
List<V>> map) {
.collect(Collectors.toMap(Pair::getKey, Pair::getValue));
}
+ /***
+ * Removed all files and dirs in the given dir recursively.
+ */
+ public static boolean deleteDirectory(File dir) {
+ File[] allContents = dir.listFiles();
Review Comment:
I believe @prashantpogde is asking what happens if `dir` is a file rather
than a directory.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]