Writes one or more bytes from memory to the file.
Returns the actual number of bytes written - which could be less than asked for if the disk has become full.
You can optionally change to a different position in the file by specifying a position - otherwise the write will continue on from the current position.
On completion the current position is updated for the next call.
The position in the file.
The number of bytes to be transferred.
The starting address in memory of the data to be written to the file.