Hi All,
I wanted to know whether Java provides any API to pull up each and every permission associated with a file.
For example: In Unix, a file has 3 sets of permissions as shown below:
<UserPermissions><GroupPermissions><Others'Permissions>
Example: -rwxrwxrwx
r - for read
w - for write
x - for execute
There are some methods provided in java.io.File, such as canRead() and canWrite(), which help in telling whether a file is readable or writable. But I did not find any API which tells whether a file is 'executable'. Also, I presume the methods above pull up the permissions pertaining to the owner of the file, but not for the group and others part of a Unix File's permissions.
Is there a way to pull up the read/write/executable permissions for all the 3 catergories namely, UserPermissions, GroupPermissions and Others'Permissions.
I appreciate your note on this and appreciate your time too.
regards,
sarin