Code: Select all
Path p1 = Paths.get("c:\\temp\\src\\foo.bar\\module-info.java"); //1
Path p2 = Paths.get("c:\\temp\\out\\foo.bar"); //2
Files.move(p1, p2);//3
and because a folder named foo.bar already exists, a java.nio.file.FileAlreadyExistsException is thrown.
Is my assumption correct?
I'm getting this because I saw it was a "FileAlreadyExistsException". I'm guessing, using a proper override option, the code will change the c:\temp\out\foo.bar folder into a c:\temp\out\module-info.java file.