Write text into file.
More...
#include <test-stream/file_out.h>
|
static int | count () |
| Number of output files which are currently opened (with this class)
|
|
|
int | base |
| Number system used for printing integral numbers (one of 2, 8, 10, or 16)
|
|
| Stringbuffer () |
| Constructor; Marks the buffer as empty.
|
|
void | put (char c) |
| Inserts a character into the buffer.
|
|
char | buffer [80] |
| buffer containing characters that will be printed upon flush()
|
|
long unsigned | pos |
| current position in the buffer
|
|
Write text into file.
This class allows a comfortable output to a file only by using the elementary system calls open()
/ write()
/ close()
and (optional) fsync()
. The class is derived from OutputStream.
◆ FileOut()
FileOut::FileOut |
( |
const char * |
path | ) |
|
|
explicit |
Constructor.
Opens the file for writing using the system call open()
.
- Parameters
-
path | Path to the output file |
◆ ~FileOut()
virtual FileOut::~FileOut |
( |
| ) |
|
|
virtual |
Destructor.
Close the output file (using the system call close()
)
◆ getPath()
const char * FileOut::getPath |
( |
| ) |
|
Get path of the output file.
- Returns
- Path to output file (as defined in constructor)
◆ count()
static int FileOut::count |
( |
| ) |
|
|
static |
Number of output files which are currently opened (with this class)
- Returns
- Number of active files
◆ flush()
virtual void FileOut::flush |
( |
| ) |
|
|
overridevirtual |
Write the string to the open file.
The implementation should only use the system calls write()
and fsync()
.
Implements OutputStream.
◆ path
const char* const FileOut::path |
|
private |
◆ fd
◆ files
The documentation for this class was generated from the following file: