[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


write

Write to a file stream that has been opened in binary mode for unformatted Input/Output.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <unistd.h>
int write(int fildes, const char *buf, int count);
Parameters:

Parameters for this facility are:

fildes  
int  
The file descriptor  
buf  
const char *  
The addrss of the buffer being written  
count  
int  
The size of the buffer being written  

Remarks:

The function write() copies the number of bytes in the count argument from the character array buffer to the file fildes. The file position is then incremented by the number of bytes written.


NOTE

This function should be used in conjunction with "read", and "open" only.
Return:

write() returns the number of bytes actually written.

See Also:

"fwrite"

"read"

"open"

For example of write() usage:
Refer to "Example of close() usage.".


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000