Skip to content

function file.read (server-side)

Available since version: 0.2

Note

This method is a extension of the original file class.

This method will read a text from a file.

Declaration

string|null file.read(int|string param = "l")

Parameters

  • int|string param: If param is integer, then the function will read x characters from a file. If param is a string, then the following commands are supported: - "a" - read whole file - "l" - read line without \n character - "L" - read line with \n character. If param is not passed, then by default line will be read from file.

Returns string|null

the read text from a file or null if there's no more text to read.