CreationDisposition enumv0.1.0
The CreationDisposition values exposed by this package.
pub enum CreationDisposition: uint32 {
CreateNew = 1,
CreateAlways = 2,
OpenExisting = 3,
OpenAlways = 4,
TruncateExisting = 5
}
Cases
| Name | Value | Description |
|---|---|---|
CreateNew | 1 | Create the file, and fail with ERROR_FILE_EXISTS if the name is taken. |
CreateAlways | 2 | Create the file, truncating whatever is there. Succeeds either way, and reports ERROR_ALREADY_EXISTS through GetLastError when it truncated rather than created. |
OpenExisting | 3 | Open the file, and fail with ERROR_FILE_NOT_FOUND if it is not there. |
OpenAlways | 4 | Open the file, creating it if it is not there. Reports ERROR_ALREADY_EXISTS when it opened rather than created. |
TruncateExisting | 5 | Open the file and truncate it, failing if it is not there. Needs write access. |