Enum FilePermission
- All Implemented Interfaces:
Serializable, Comparable<FilePermission>, java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionread permission, groupread, write, execute/search by groupwrite permission, groupexecute/search permission, groupread permission, othersread, write, execute/search by otherwrite permission, othersexecute/search permission, groupset-group-ID on executionon directories, restricted deletion flagset-user-ID on executionread permission, ownerread, write, execute/search by userwrite permission, ownerexecute/search permission, owner -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFilePermission(int val) privateFilePermission(FilePermission... perms) -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<FilePermission> fromMask(int mask) booleanisIn(int mask) static inttoMask(Set<FilePermission> perms) static FilePermissionReturns the enum constant of this type with the specified name.static FilePermission[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
USR_R
read permission, owner -
USR_W
write permission, owner -
USR_X
execute/search permission, owner -
GRP_R
read permission, group -
GRP_W
write permission, group -
GRP_X
execute/search permission, group -
OTH_R
read permission, others -
OTH_W
write permission, others -
OTH_X
execute/search permission, group -
SUID
set-user-ID on execution -
SGID
set-group-ID on execution -
STICKY
on directories, restricted deletion flag -
USR_RWX
read, write, execute/search by user -
GRP_RWX
read, write, execute/search by group -
OTH_RWX
read, write, execute/search by other
-
-
Field Details
-
val
private final int val
-
-
Constructor Details
-
FilePermission
private FilePermission(int val) -
FilePermission
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isIn
public boolean isIn(int mask) -
fromMask
-
toMask
-