Enum Class FileAccess
- All Implemented Interfaces:
Serializable,Comparable<FileAccess>,Constable,EnumInteger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIt is used to indicate access to a system access control list (SACL).For a file object, the right to append data to the file.The right to modify the discretionary access control list (DACL) in /// the object's security descriptor.The right to delete the object.For a directory, the right to delete a directory and all the files it contains, including read-only files.For a native code file, the right to execute the file.All possible access rights.Generic execute access.Generic read access.Generic write access.All the access rights that are valid for the caller.The right to read file attributes.Read access right to an object.The right to read extended file attributes.The right to read the information in the object's security descriptor, not including the information in the system access control list (SACL).Deprecated.The right to change the owner in the object's security descriptor.The right to use the object for synchronization.The right to write file attributes.Write access right to an object.The right to write extended file attributes. -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumIntegerSet<FileAccess>fromInt(int i) intgetMask()static FileAccessReturns the enum constant of this class with the specified name.static FileAccess[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ_DATA
Read access right to an object.nativeconst{FILE_READ_DATA,0x00000001,File & pipe}
nativeconst{FILE_LIST_DIRECTORY,0x00000001,Directory}
-
WRITE_DATA
Write access right to an object.nativeconst{FILE_WRITE_DATA,0x00000002,File & pipe}
nativeconst{FILE_ADD_FILE,0x00000002,Directory}
-
APPEND_DATA
For a file object, the right to append data to the file.nativeconst{FILE_APPEND_DATA,0x00000004,File}
nativeconst{FILE_ADD_SUBDIRECTORY,0x00000004,Directory}
nativeconst{FILE_CREATE_PIPE_INSTANCE,0x00000004,Named pipe}
-
READ_EXTENDED_ATTRIBUTES
The right to read extended file attributes. -
WRITE_EXTENDED_ATTRIBUTES
The right to write extended file attributes.nativeconst{FILE_WRITE_EA,0x00000010,File & directory}
-
EXECUTE
For a native code file, the right to execute the file. This access right given to scripts may cause the script to be executable, depending on the script interpreter. -
DELETE_CHILD
For a directory, the right to delete a directory and all the files it contains, including read-only files. -
READ_ATTRIBUTES
The right to read file attributes. -
WRITE_ATTRIBUTES
The right to write file attributes. -
DELETE
The right to delete the object. -
READ_PERMISSIONS
The right to read the information in the object's security descriptor, not including the information in the system access control list (SACL).nativeconst{READ_CONTROL,0x00020000}
-
CHANGE_PERMISSIONS
The right to modify the discretionary access control list (DACL) in /// the object's security descriptor.nativeconst{WRITE_DAC,0x00040000}
-
SET_OWNERSHIP
The right to change the owner in the object's security descriptor.nativeconst{WRITE_OWNER,0x00080000}
-
SYNCHRONIZE
The right to use the object for synchronization. This enables a thread to wait until the object is in the signaled state. Some object types do not support this access right.nativeconst{SYNCHRONIZE,0x00100000}
-
ACCESS_SYSTEM_SECURITY
It is used to indicate access to a system access control list (SACL). This type of access requires the calling process to have the SE_SECURITY_NAME (Manage auditing and security log) privilege. If this flag is set in the access mask of an audit access ACE (successful or unsuccessful access), the SACL access will be audited.nativeconst{ACCESS_SYSTEM_SECURITY,0x01000000}
-
RESERVED
Deprecated.Obsolete, useACCESS_SYSTEM_SECURITYinstead. -
MAXIMUM_ALLOWED
All the access rights that are valid for the caller.nativeconst{MAXIMUM_ALLOWED,0x02000000}
-
GENERIC_ALL
All possible access rights.nativeconst{GENERIC_ALL,0x10000000}
-
GENERIC_EXECUTE
Generic execute access.nativeconst{GENERIC_EXECUTE,0x20000000}
-
GENERIC_WRITE
Generic write access.nativeconst{GENERIC_WRITE,0x40000000}
-
GENERIC_READ
Generic read access.nativeconst{GENERIC_READ,0x80000000}
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
fromInt
-
getMask
public int getMask()- Specified by:
getMaskin interfaceEnumInteger
-