file_read()

Reads the contents of an open file as a string.

Syntax

file_read({file_handle})

Parameters

Parameter Type Description Comment
file_handle Number Handle of the open file to read from.

Return Value

Examples

Open a file, read its contents, and store in result

hnd = file_open("document.txt");
content = file_read(hnd); // returns file content as string

See also

file_delete

file_open
file_close

file_read

file_append
file_flush