Reads up to buffer.length bytes from the file.
The buffer to read into.
The number of bytes that were read, or an error if fread fails.
See Implementation
Reads up to buffer.length bytes from the file.