# Interface FilePermissions

All Known Subinterfaces:
  `ConfigurableFilePermissions`

public interface FilePermissions
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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `UserClassFilePermissions`
  `getGroup()`
  Describes what actions a user, who is a member of the group that the file/directory belongs to, can perform on the file/directory.
  `UserClassFilePermissions`
  `getOther()`
  Describes what actions all other users (non-owner, non-group) can perform on the file/directory.
  `UserClassFilePermissions`
  `getUser()`
  Describes what actions the owner of the file can perform on the file/directory.
  `int`
  `toUnixNumeric()`
  Converts the permissions for the various user groups to a numeric Unix permission.

- ## Method Details

  - ### getUser

    UserClassFilePermissions getUser()
    Describes what actions the owner of the file can perform on the file/directory.

    For further details about possible actions see `UserClassFilePermissions`.

    Since:
      8.3

  - ### getGroup

    UserClassFilePermissions getGroup()
    Describes what actions a user, who is a member of the group that the file/directory belongs to, can perform on the file/directory.

    For further details about possible actions see `UserClassFilePermissions`.

    Since:
      8.3

  - ### getOther

    UserClassFilePermissions getOther()
    Describes what actions all other users (non-owner, non-group) can perform on the file/directory.

    For further details about possible actions see `UserClassFilePermissions`.

    Since:
      8.3

  - ### toUnixNumeric

    int toUnixNumeric()
    Converts the permissions for the various user groups to a numeric Unix permission. See `ConfigurableFilePermissions.unix(int)` for details.
    Since:
      8.3