NKing253
NKing253

Reputation: 167

Setting file permissions using java.io.File methods

I'm using java.io.File methods: setReadable, setWritable, setExecutable to set file permissions. However, in spite of using these methods the permissions are always set to the default settings. Why is that?

Upvotes: 2

Views: 2387

Answers (1)

andrewmu
andrewmu

Reputation: 14534

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"

Upvotes: 3

Related Questions