_write() Write Data to a File
#include <io.h>
int _write(handle,buf,nbyte);
int handle; Handle associated with file
void *buf; Buffer
int nbyte; Number of bytes to be written
_write() writes 'nbytes' bytes from buffer 'buf' to the file
associated with 'handle'. 'handle' is a file handle obtained from a
creat(), open(), dup() dup2(), or fcntl() call.
Writing always proceeds from the current file pointer. For devices,
bytes are directly sent to the device.
Return: The number of bytes written. On error, -1 is returned
and 'errno' is set to one of the following:
EACCES Permission denied
EBADF Bad file number
If the number of bytes actually written is less than that
requested, the condition should be considered an error.
The disk is probably full.
Notes: _write() does not do a (LF) to (CR-LF) translation
because all of its files are binary.
Seealso:
This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster