gnodet commented on a change in pull request #10:
URL: https://github.com/apache/maven-clean-plugin/pull/10#discussion_r781361531



##########
File path: src/main/java/org/apache/maven/plugins/clean/Cleaner.java
##########
@@ -297,6 +299,12 @@ else if ( file.exists() )
         return result;
     }
 
+    private boolean isSymbolicLink( Path path ) throws IOException
+    {
+        BasicFileAttributes attrs = Files.readAttributes( path, 
BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS );
+        return attrs.isSymbolicLink() || ( attrs.isDirectory() && 
attrs.isOther() );

Review comment:
       I'm experimenting with something like:
   ```
           Path testDir = Paths.get( "target/test-dir" ).toAbsolutePath();
           Files.createDirectories( testDir );
           Path orgDir = testDir.resolve( "org-dir" );
           Path jctDir = testDir.resolve( "jct-dir" );
           Files.createDirectories( orgDir );
   
           Process process = new ProcessBuilder()
                   .directory( testDir.toFile() )
                   .command( "mklink", "/J", jctDir.toString(), 
orgDir.toString() )
                   .start();
           int result = process.waitFor();
   ```
   The idea comes from https://www.geeksforgeeks.org/creating-junction-points/




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