The os.Path class / os.Path methods |
Returns the UNIX™ file permissions of a file.
os.Path.rwx( fname STRING) RETURNING mode INTEGER
This method can only be used on UNIX!
Function returns -1 if it fails to get the permissions.
The mode is returned as a decimal value which is the combination of read, write and execution bits for the user, group and other part of the UNIX file permission. For example, if a file has the -rwxr-xr-x permissions, the method returns ((4+2+1) * 64 + (4+1) * 8) + (4+1) ) = 493.