For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

ConfigurableFilePermissions

Provides the means of specifying file and directory access permissions for all classes of system users.

For details on classes of users and file/directory permissions see FilePermissions.

An example usage of this functionality would be configuring a copy task and explicitly specifying the destination file permissions:

from(...)
into(...)
filePermissions {
    user {
        read = true
        execute = true
    }
    other.execute = false
}

Since

8.3

Functions

Link copied to clipboard
Returns the permissions a user, who is a member of the group that the file/directory belongs to, has for the file/directory.
Link copied to clipboard
Returns the permissions all other users (non-owner, non-group) have for the file/directory.
Link copied to clipboard
Returns the permissions the owner of the file has for the file/directory.
Link copied to clipboard
abstract fun group(configureAction: Action<in ConfigurableUserClassFilePermissions>)
Modifies the permissions a user, who is a member of the group that the file/directory belongs to, has for the file/directory.
Link copied to clipboard
abstract fun other(configureAction: Action<in ConfigurableUserClassFilePermissions>)
Modifies the permissions all other users (non-owner, non-group) have for the file/directory.
Link copied to clipboard
abstract fun toUnixNumeric(): Int
Converts the permissions for the various user groups to a numeric Unix permission.
Link copied to clipboard
abstract fun unix(unixNumeric: Int)
Sets Unix style numeric permissions.
abstract fun unix(unixNumericOrSymbolic: String)
Sets Unix style permissions.
Link copied to clipboard
abstract fun user(configureAction: Action<in ConfigurableUserClassFilePermissions>)
Modifies the permissions the owner of the file has for the file/directory.