Next: , Previous: , Up: ostream subclasses without styling   [Contents][Index]


3.5.3.2 The fd_ostream class

The file_ostream class supports output to a file descriptor. Its type is ‘fd_ostream_t’. It is a subclass of ‘ostream_t’ that adds no methods.

It can be instantiated through this function:

Function: fd_ostream_t fd_ostream_create (int fd, const char *filename, bool buffered)

Creates an output stream referring to the file descriptor fd.

filename is used only for error messages.

Note: The resulting stream must be closed before fd can be closed.