sijie commented on a change in pull request #1385: remove function package on 
function delete
URL: https://github.com/apache/incubator-pulsar/pull/1385#discussion_r174629326
 
 

 ##########
 File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/Utils.java
 ##########
 @@ -206,4 +207,14 @@ public static String getFullyQualifiedInstanceId(String 
tenant, String namespace
                                                      String functionName, int 
instanceId) {
         return String.format("%s/%s/%s:%d", tenant, namespace, functionName, 
instanceId);
     }
+
+    public static boolean deleteDirectory(File directoryToBeDeleted) {
 
 Review comment:
   I think deleteRecursively has been available in at some libraries already.
   
   e.g. guava - 
https://google.github.io/guava/releases/21.0/api/docs/com/google/common/io/MoreFiles.html#deleteRecursively-java.nio.file.Path-com.google.common.io.RecursiveDeleteOption...-
   
   commons-io : 
https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/FileUtils.html#deleteDirectory(java.io.File)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to