File:read
EditReads data from the file.
data, size = File:read(bytes)
Arguments
Name | Type | Description |
bytes | number |
The number of bytes to read from the file, or nil to read the rest of the file.
|
Returns
Name | Type | Description |
data | string | The data that was read, or nil if an error occurred. |
size | number | The number of bytes that were read, or the error message if an error occurred. |
Notes
The file must have been opened for reading.
The maximum number of bytes that can be read at a time is 2^53 - 1.