// PROTOTYPE int write(int fd, const void* buf, size_t count)
Writes to a file. If the file was opened with flag
O_APPEND then the file is appended to. Otherwise, writes occur at the current file position, see
fd: The file descriptor for the file, return from the
buf: Pointer to the buffer to write to the file.
count: Number of bytes to write to the file.
Returns the number of bytes written, which is typically
On error, returns -1 and sets
errno. Some possible
errno values include:
ENOSPCThere is no space on the file system.