FileMode Enum
NuGet: GHIElectronics.TinyCLR.IO
Assembly: GHIElectronics.TinyCLR.IO
Namespace: System.IO
Specifies how the operating system should open a file.
public enum FileMode
Fields
| Name | Value | Description |
|---|---|---|
CreateNew | 1 | Creates a new file; throws if the file already exists. |
Create | 2 | Creates a new file, overwriting one if it already exists. |
Open | 3 | Opens an existing file; throws if the file does not exist. |
OpenOrCreate | 4 | Opens the file if it exists; otherwise creates a new file. |
Truncate | 5 | Opens an existing file and truncates it to zero bytes; throws if it does not exist. |
Append | 6 | Opens the file and seeks to the end, or creates a new file, for appending. |