# FilePermissions

interface FilePermissions(source)

Describes file and directory access permissions for all classes of system users.

Follows the style of Unix file permissions, based on the concept of file ownership.

Permissions are grouped into 3 distinct categories (representing different classes of users):

- OWNER (user) permissions: what actions the owner of the file/directory can perform on the file/directory
- GROUP permissions: what actions a user, who is a member of the group that a file/directory belongs to, can perform on the file/directory
- OTHER (world) permissions: what actions all other users (non-owner, non-group) can perform on the file/directory

For further details on specific permission for a certain class of user see UserClassFilePermissions, but in essence each class of users can have the right to READ, WRITE or EXECUTE files.

The default permissions used differ between files and directories and are as follows:

- FILE: read &write for OWNER, read for GROUP, read for OTHER (0644, rw-r--r--)
- DIRECTORY: read, write &execute for OWNER, read &execute for GROUP, read &execute for OTHER (0755, rwxr-xr-x)

#### Since

8.3

#### Inheritors

ConfigurableFilePermissions

## Functions

getGroup
Link copied to clipboard
abstract fun getGroup(): UserClassFilePermissions
Describes what actions a user, who is a member of the group that the file/directory belongs to, can perform on the file/directory.
getOther
Link copied to clipboard
abstract fun getOther(): UserClassFilePermissions
Describes what actions all other users (non-owner, non-group) can perform on the file/directory.
getUser
Link copied to clipboard
abstract fun getUser(): UserClassFilePermissions
Describes what actions the owner of the file can perform on the file/directory.
toUnixNumeric
Link copied to clipboard
abstract fun toUnixNumeric(): Int
Converts the permissions for the various user groups to a numeric Unix permission.