lovr.filesystem.read
EditRead the contents of a file.
contents, bytes = lovr.filesystem.read(filename, bytes)
Arguments
Name | Type | Default | Description |
filename | string | The name of the file to read. | |
bytes | number | -1 | The number of bytes to read (if -1, all bytes will be read). |
Returns
Name | Type | Description |
contents | string | The contents of the file. |
bytes | number | The number of bytes read from the file. |
Notes
If the file does not exist or cannot be read, nil is returned.