Interop.Windows.NtDll.CreateDisposition
enum CreateDisposition
File creation disposition when calling directly to NT APIs.
FILE_CREATE = 2
Create if the file doesn't exist or fail if it does exist. Equivalent to CREATE_NEW
or CreateNew.
FILE_OPEN = 1
Open if the file exists or fail if it doesn't exist. Equivalent to OPEN_EXISTING or
Open.
FILE_OPEN_IF = 3
Open if the file exists or create if it doesn't exist. Equivalent to OPEN_ALWAYS or
OpenOrCreate.
FILE_OVERWRITE = 4
Open and overwrite if the file exists or fail if it doesn't exist. Equivalent to
TRUNCATE_EXISTING or Truncate.
Open and overwrite if the file exists or create if it doesn't exist. Equivalent to
CREATE_ALWAYS or Create.
FILE_SUPERSEDE = 0
Default. Replace or create. Deletes existing file instead of overwriting.