Interop.Windows.NtDll.CreateOptions
enum CreateOptions
Options for creating/opening files with NtCreateFile.
Complete the operation immediately with a success code of STATUS_OPLOCK_BREAK_IN_PROGRESS if
the target file is oplocked.
Create a tree connection for this file in order to open it over the network.
FILE_DELETE_ON_CLOSE = 4096
Delete the file when the last handle to it is passed to NtClose. Requires Delete flag in
DesiredAccess parameter.
File being created or opened must be a directory file. Disposition must be FILE_CREATE, FILE_OPEN,
or FILE_OPEN_IF.
FILE_DISALLOW_EXCLUSIVE = 131072
CreateFile2 uses this flag to prevent opening a file that you don't have access to without specifying
FILE_SHARE_READ. (Preventing users that can only read a file from denying access to other readers.)
FILE_NO_COMPRESSION = 32768
When creating a file, specifies that it should not inherit the compression bit from the parent directory.
FILE_NO_EA_KNOWLEDGE = 512
If the extended attributes on an existing file being opened indicate that the caller must
understand extended attributes to properly interpret the file, fail the request.
File cannot be cached in driver buffers. Cannot use with AppendData desired access.
File being created or opened must not be a directory file. Can be a data file, device,
or volume.
FILE_OPEN_BY_FILE_ID = 8192
Open the file by reference number or object ID. The file name that is specified by the ObjectAttributes
name parameter includes the 8 or 16 byte file reference number or ID for the file in the ObjectAttributes
name field. The device name can optionally be prefixed.
FILE_OPEN_FOR_BACKUP_INTENT = 16384
The file is being opened for backup intent. Therefore, the system should check for certain access rights
and grant the caller the appropriate access to the file before checking the DesiredAccess parameter
against the file's security descriptor.
FILE_OPEN_NO_RECALL = 4194304
Causes files that are marked with the Offline attribute not to be recalled from remote storage.
FILE_OPEN_REPARSE_POINT = 2097152
Open a file with a reparse point attribute, bypassing the normal reparse point processing.
FILE_OPEN_REQUIRING_OPLOCK = 65536
The file is being opened and an opportunistic lock (oplock) on the file is being requested as a single atomic
operation.
FILE_RANDOM_ACCESS = 2048
Accesses to the file can be random, so no sequential read-ahead operations should be performed
on the file by FSDs or the system.
FILE_RESERVE_OPFILTER = 1048576
This flag allows an application to request a filter opportunistic lock (oplock) to prevent other applications
from getting share violations.
All accesses to the file are sequential.
FILE_SESSION_AWARE = 262144
The client opening the file or device is session aware and per session access is validated if necessary.
All operations are performed synchronously. Any wait on behalf of the caller is
subject to premature termination from alerts.
All operations are performed synchronously. Waits in the system to synchronize I/O queuing
and completion are not subject to alerts.
Applications that write data to the file must actually transfer the data into
the file before any requested write operation is considered complete. This flag
is set automatically if FILE_NO_INTERMEDIATE_BUFFERING is set.