Edit

Share via


KernelFileMode Enum

Definition

public enum KernelFileMode
type KernelFileMode = 
Public Enum KernelFileMode
Inheritance
KernelFileMode

Fields

Name Value Description
Replace 0

If the file already exists, replace it with the given file. If it does not, create the given file.

Open 1

If the file already exists, open it instead of creating a new file. If it does not, fail the request and do not create a new file.

CreateNew 2

If the file already exists, fail the request and do not create or open the given file. If it does not, create the given file.

OpenOrCreate 3

If the file already exists, open it. If it does not, create the given file.

Truncate 4

If the file already exists, open it and overwrite it. If it does not, fail the request.

TruncateOrCreate 5

If the file already exists, open it and overwrite it. If it does not, create the given file.

Remarks

See the documentation on NtCreateFile's CreateDisposition parameter for more information on these values.

Applies to