Skip to content

FileMode

1 min read

Import: import system.io;

FileMode

Access, creation, and truncation behavior when opening a file.

public enum FileMode

Read

Read an existing file without changing it.

Read

Write

Create or truncate a file for writing.

Write

Append

Create a file if needed and append writes to its end.

Append

ReadWrite

Read and write an existing file without truncating it.

ReadWrite

WriteRead

Create or truncate a file for reading and writing.

WriteRead

AppendRead

Read a file and append writes, creating it if needed.

AppendRead