Setting file permissions using java.io.File methods
I'm using java.io.File
methods: setReadable
, setWritable
, setExecutable
to set file permissions. However, in s开发者_运维百科pite of using these methods the permissions are always set to the default settings. Why is that?
These methods are not always supported by the underlying filesystem. E.g. it's not possible to make a point unreadable in NTFS on Windows XP.
There's more information here: www.oracle.com, under "Setting File and Directory Permissions"
精彩评论