When I copy a file from source folder to destination folder the permissions of the destination folder are not inherited by newly copied file. is there a way in Java where file copy to destination would inherit permissions of destination folder?
In java7 - You can do the following
Files.copy(source, target, StandardCopyOption.COPY_ATTRIBUTES)
I have not tested this code. Hope it helps!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With