How to change image permission mode to 777 using Java code?

前端 未结 5 1558
野趣味
野趣味 2021-01-12 08:13

I want to give permissions mode value \"777\" to image file using Java code. How can I give that using Java? Because I can\'t delete the image with default permission mode \

5条回答
  •  -上瘾入骨i
    2021-01-12 09:04

    Its a part of the NIO package. You can do it via java.nio.file.attribute.PosixFilePermission.

    This is only in Java 1.7 though, it has been a known issue for a while now.

提交回复
热议问题