- Documentation
- Shared functions
- fileWrite
Function
fileWrite
Writes strings from the current position (each argument one after another) and moves the position. Supports binary data.
Syntax
int fileWrite(file theFile, string string1 [, string ...])Arguments
theFilefile- A file handle.
string1string- The first string.
...string, optional- More strings.
Returns
Number of bytes written, or false (e.g. a read-only file).
Example
local file = fileCreate("scores.csv")
fileWrite(file, "gracz;punkty\n", "Jan;150\n", "Ola;210\n")
fileClose(file)