Interop.Windows.NtDll.DesiredAccess
enum DesiredAccess
System.IO.FileAccess looks up these values when creating handles
DELETE = 65536
The right to delete the object.
FILE_ADD_FILE = 2
For a directory, the right to create a file in a directory.
For a directory, the right to create a subdirectory.
FILE_ALL_ACCESS = 983551
All standard and specific rights. [FILE_ALL_ACCESS]
FILE_APPEND_DATA = 4
For a file, the right to append data to a file. FILE_WRITE_DATA is needed
to overwrite existing data.
For a named pipe, the right to create a pipe instance.
FILE_DELETE_CHILD = 64
For a directory, the right to delete a directory and all
the files it contains, including read-only files.
FILE_EXECUTE = 32
The right to execute the file.
FILE_GENERIC_EXECUTE = 536870912
Maps internally to FILE_EXECUTE | FILE_READ_ATTRIBUTES | STANDARD_RIGHTS_EXECUTE
| SYNCHRONIZE.
(For directories, FILE_DELETE_CHILD | FILE_READ_ATTRIBUTES | STANDARD_RIGHTS_EXECUTE
| SYNCHRONIZE.)
FILE_GENERIC_READ = 2147483648
Maps internally to FILE_READ_ATTRIBUTES | FILE_READ_DATA | FILE_READ_EA
| STANDARD_RIGHTS_READ | SYNCHRONIZE.
(For directories, FILE_READ_ATTRIBUTES | FILE_LIST_DIRECTORY | FILE_READ_EA
| STANDARD_RIGHTS_READ | SYNCHRONIZE.)
FILE_GENERIC_WRITE = 1073741824
Maps internally to FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA
| FILE_WRITE_EA | STANDARD_RIGHTS_READ | SYNCHRONIZE.
(For directories, FILE_ADD_SUBDIRECTORY | FILE_WRITE_ATTRIBUTES | FILE_ADD_FILE AddFile
| FILE_WRITE_EA | STANDARD_RIGHTS_READ | SYNCHRONIZE.)
For a directory, the right to list the contents.
FILE_READ_ATTRIBUTES = 128
The right to read attributes.
FILE_READ_DATA = 1
For a file, the right to read data from the file.
FILE_READ_EA = 8
The right to read extended attributes.
FILE_TRAVERSE = 32
For a directory, the right to traverse the directory.
FILE_WRITE_ATTRIBUTES = 256
The right to write attributes.
FILE_WRITE_DATA = 2
For a file, the right to write data to the file.
FILE_WRITE_EA = 16
The right to write extended attributes.
READ_CONTROL = 131072
The right to read the information in the object's security descriptor.
Doesn't include system access control list info (SACL).
STANDARD_RIGHTS_EXECUTE = 131072
Same as READ_CONTROL.
STANDARD_RIGHTS_READ = 131072
Same as READ_CONTROL.
STANDARD_RIGHTS_WRITE = 131072
Same as READ_CONTROL.
SYNCHRONIZE = 1048576
The right to use the object for synchronization. Enables a thread to wait until the object
is in the signaled state. This is required if opening a synchronous handle.
WRITE_DAC = 262144
The right to modify the discretionary access control list (DACL) in the
object's security descriptor.
WRITE_OWNER = 524288
The right to change the owner in the object's security descriptor.