Java file copy - how to inherit destination directory permissions
2 answers
Using Files.Copy works great and I tested this code where renameTo () or FileInput / OutputStream code didn't work.
Try it without StandardCopyOption and the permissions on the destination folder are automatically inherited like this:
Files.copy(source.toPath(), destination.toPath());
Hope this helps.
0
source to share