Writes up to buffer.length bytes to the file.
The bytes to write.
A result that's either buffer.length or an error.
See Implementation
Writes up to buffer.length bytes to the file.