The mode to open a stream from a file.
| Type | Name | Value |
|---|---|---|
| constant | APPEND | 0 |
| constant | CREATE | 1 |
| constant | OPEN | 2 |
public const FileMode APPEND = 0If file doesn't exist, create one; if it does, append new contents to the end. File is in WRITE mode.
public const FileMode CREATE = 1If file doesn't exist, create one; if it does, truncate the contents. File is in WRITE mode.
public const FileMode OPEN = 2Open an existing file. If it doesn't exist, throw IOException. File is in READ mode.