ruanwenjun commented on code in PR #16923:
URL: 
https://github.com/apache/dolphinscheduler/pull/16923#discussion_r1898299918


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/FileUtils.java:
##########
@@ -289,6 +291,29 @@ public static void setFileTo755(File file) throws 
IOException {
         }
     }
 
+    public static void createDirectoryWith775(@NonNull Path path) throws 
IOException {
+        if (path.toFile().exists()) {
+            return;
+        }
+        if (OSUtils.isWindows()) {
+            Files.createDirectories(path);
+        } else {
+            Path parent = path.getParent();
+            if (parent != null && !parent.toFile().exists()) {
+                createDirectoryWith755(parent);

Review Comment:
   ```suggestion
                   createDirectoryWith775(parent);
   ```
   
   Can we unify the method `createDirectoryWith755` ? these two method has the 
same logic.
   We can create a new method createDirectory(@NonNull Path path, 
Set<PosixFilePermission> permissions);
   



-- 
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]

Reply via email to