Dart API Reference
dart:io
FileMode
FileMode
class
The modes in which a File can be opened.
The modes in which a File can be opened.
Constants
READ
=
const FileMode._internal(0)
The mode for opening a file only for reading.
WRITE
=
const FileMode._internal(1)
Mode for opening a file for reading and writing. The file is overwritten if it already exists. The file is created if it does not already exist.
APPEND
=
const FileMode._internal(2)
Mode for opening a file for reading and writing to the end of it. The file is created if it does not already exist.
WRITE_ONLY
=
const FileMode._internal(3)
Mode for opening a file for writing only. The file is overwritten if it already exists. The file is created if it does not already exist.
WRITE_ONLY_APPEND
=
const FileMode._internal(4)
Mode for opening a file for writing only to the end of it. The file is created if it does not already exist.