home *** CD-ROM | disk | FTP | other *** search
- @node write, io
- @subheading Syntax
-
- @example
- #include <unistd.h>
-
- int write(int file, const void *buffer, unsigned count);
- @end example
-
- @subheading Description
-
- This function writes @var{count} bytes from @var{buffer} to
- @var{file}. It returns the number of bytes actually written. It will
- return zero if the disk is full, and may return less than @var{count}
- even under valid conditions.
-
- Note that if @var{file} is a text file, @code{write} may write more
- bytes than it reports.
-
- If @var{count} is zero, the function does nothing and returns zero.
- Use _write if you want to actually ask dos to write zero bytes.
-
- @subheading Return Value
-
- The number of bytes written, zero at EOF, or -1 on error.
-
- @subheading Example
-
- @example
- write(fd, "hello", 5);
- @end example
-
-