Flength
From SA-MP Wiki
Flength
Checks the length of a file.
(handle[])
| handle[] | The File handle to check (returned by fopen) |
| Returns | The length of the file, in bytes. |
new File:example = fopen("file.txt", io_write); fwrite(example, "I wonder how long this is"); printf("The size of the file is %i bytes", flength(example)); 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.
- fopen: Open a file.
