org.gradle.api.file.UserClassFilePermissions Maven / Gradle / Ivy
Show all versions of gradle-api Show documentation
/*
* Copyright 2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.api.file;
/**
* Describes file and directory access permissions for a certain class of users (see {@link FilePermissions}).
*
* Permissions consist of:
*
* - READ access: the capability to view the contents of a file, or to list the contents of a directory
* - WRITE access: the capability to modify or remove the contents of a file, or to add or remove files to/from a directory
* - EXECUTE access: the capability to run a file as a program; executing a directory doesn't really make sense, it's more like
* a traverse permission; for example, a user must have 'execute' access to the 'bin' directory in order to execute the 'ls' or 'cd' commands.
*
*
* @since 8.3
*/
public interface UserClassFilePermissions {
/**
* Describes if a certain class of users has read access to a file or directory.
*
* Read access is the capability to view the contents of a file, or to list the contents of a directory.
*/
boolean getRead();
/**
* Describes if a certain class of users has write access to a file or directory.
*
* Write access is the capability to modify or remove the contents of a file,
* or to add or remove files to/from a directory.
*/
boolean getWrite();
/**
* Describes if a certain class of users has execute access to a file or directory.
*
* Execute access is the capability to run a file as a program; executing a directory
* doesn't really make sense, it's more like a traverse permission; for example, a user
* must have 'execute' access to the 'bin' directory in order to execute the 'ls' or 'cd' commands.
*/
boolean getExecute();
}