Skip to main content

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

NameValueDescription
CreateNew1Creates a new file; throws if the file already exists.
Create2Creates a new file, overwriting one if it already exists.
Open3Opens an existing file; throws if the file does not exist.
OpenOrCreate4Opens the file if it exists; otherwise creates a new file.
Truncate5Opens an existing file and truncates it to zero bytes; throws if it does not exist.
Append6Opens the file and seeks to the end, or creates a new file, for appending.