rili::stream::WritableFile Class Reference
Inheritance diagram for rili::stream::WritableFile:
[legend]
Collaboration diagram for rili::stream::WritableFile:
[legend]

Public Member Functions

 WritableFile (std::string const &file)
 
 WritableFile (std::string const &file, bool append)
 
virtual ~WritableFile ()
 
- Public Member Functions inherited from rili::stream::WritableFileProxy
 WritableFileProxy (FILE *writableFile)
 
void write (char const *data, std::size_t size) override
 
std::exception_ptr flush () override
 
view::Base const & writableView () const override
 
- Public Member Functions inherited from rili::stream::Writable
void write (unsigned char const *data, std::size_t size)
 
Writableoperator<< (char v)
 
Writableoperator<< (unsigned char v)
 
Writableoperator<< (char const *v)
 
Writableoperator<< (unsigned char const *v)
 
Writableoperator<< (std::string const &v)
 
Writableoperator<< (short v)
 
Writableoperator<< (unsigned short v)
 
Writableoperator<< (long v)
 
Writableoperator<< (unsigned long v)
 
Writableoperator<< (long long v)
 
Writableoperator<< (unsigned long long v)
 
Writableoperator<< (int v)
 
Writableoperator<< (unsigned int v)
 
Writableoperator<< (float v)
 
Writableoperator<< (double v)
 
Writableoperator<< (bool v)
 
Writableoperator<< (void *v)
 
OperationResult operator<< (std::function< OperationResult(Writable &)> const &fn)
 
Writableoperator<< (Writer const &fn)
 

Constructor & Destructor Documentation

rili::stream::WritableFile::WritableFile ( std::string const &  file)
inlineexplicit

WritableFile try to open file from given path in "wb" mode and construct stream.

Parameters
file- path of file to open
See also
fopen
rili::stream::WritableFile::WritableFile ( std::string const &  file,
bool  append 
)
inline

WritableFile try to open file from given path in "wb" mode if append=false, in "ab" mode otherwise and construct stream.

Parameters
file- path of file to open
append- if true will open file in append mode, otherwise in write mode
See also
fopen
virtual rili::stream::WritableFile::~WritableFile ( )
virtual

~WritableFile will close managed file if it's open


The documentation for this class was generated from the following file:
  • rili/stream/CstdioWrappers.hpp