Constructs a new file stream and initializes it. Please note that Create must be called before any other operation of the file stream is performed. See the overview of the TMixedFStream structure for an example how to read and write data from and to a file.
The parameter FName defines the full path specification of the file to be opened. The Mode parameter determines how the file is opened:
Mode |
Explanation |
fmCreate |
Creates a file with the specified name. If a file with the given name exists, the existing file is overridden and opened in write mode. |
fmOpenRead |
Opens the file for reading only. |
fmOpenWrite |
Opens the file for writing only. Writing to the file completely replaces the current contents. |
fmOpenReadWrite |
Opens the file to modify the current contents rather than replace them. |
|