System.IOUtils.TFileMode
Delphi
TFileMode = (fmCreateNew, fmCreate, fmOpen, fmOpenOrCreate, fmTruncate,
fmAppend);
C++
enum class DECLSPEC_DENUM TFileMode : unsigned char { fmCreateNew, fmCreate, fmOpen, fmOpenOrCreate, fmTruncate, fmAppend };
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
enum | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | System.IOUtils |
Description
Enumerates the possible modes to open a file.
TFileMode enumerates the possible modes to open a file. The following are possible values of TFileMode.
Value | Meaning |
---|---|
fmCreateNew |
The file should be created and allow write access. If the file already exists, an exception should be thrown. |
fmCreate |
The file should be created and allow write access. If the file already exists, it is truncated. |
fmOpen |
The file should be opened. If the file does not exist, an exception should be thrown. |
fmOpenOrCreate |
The file should be opened. If the file does not exist, the file should be created. |
fmTruncate |
The file should be truncated. If the file does not exist, an exception should be thrown. |
fmAppend |
The file should be opened in append mode. The next writes will be appended to the end of the file. If the file does not exist, an exception should be thrown. |