gnodet edited a comment on pull request #10:
URL:
https://github.com/apache/maven-clean-plugin/pull/10#issuecomment-1009093211
> When can this happen? I mean, can we create a junction in Java without
using native code?
I'm going to experiment 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]