Fopen
From SA-MP Wiki
Fopen
Open a file to write from or read to
(name[], mode)
| name[] | The name of the file to open |
| mode | The mode to open it with |
| Returns | File:Filehandle, is 0 if failed |
Modes
io_read Reads the file. The file must exist io_write Write in the file, or create a new one io_readwrite Reads the file or creates a new one io_append Appends to file, write-only
new File:example = fopen("file.txt", io_write); fwrite(example, "I just wrote here!"); fclose(example);
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- fclose: Close a file.
