[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'sysutils' (#rtl) |
Open an existing file and return a filehandle
Source position: filutilh.inc line 74
function FileOpen( |
const FileName: String; |
Mode: Integer |
):THandle; |
FileOpen opens a file with name FileName with mode Mode. Mode can be one of the following constants:
If the file has been successfully opened, it can be read from or written to (depending on the Mode parameter) with the FileRead and FileWrite functions.
Remark: | Remark that you cannot open a file if it doesn't exist yet, i.e. it will not be created for you. If you want tp create a new file, or overwrite an old one, use the FileCreate function. |
For an example, see FileOpen
On Error, -1 is returned.
|
Close a file handle. |
|
|
Write data from a buffer to a given filehandle. |
|
|
Create a new file and return a handle to it. |
|
|
Read data from a filehandle in a buffer. |
|
|
Truncate an open file to a given size. |
|
|
Set the current file position on a file handle. |
No notes exist for this page yet.