open output files for writing, checking for pre-existing file if necessary More...
#include "file/ofstream.h"
Public Member Functions | |
OFStream () | |
OFStream (const std::string &path, const std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary) | |
void | open (const std::string &path, const std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary) |
open output files for writing, checking for pre-existing file if necessary
This class is intended to be used as a substitute for std::ofstream. It ensures that if the user has not given the command permission to overwrite output files, the presence of an existing file is first checked. It also removes the necessity to explicitly convert a path expressed as a std::string to a c-style string.
Definition at line 39 of file ofstream.h.
|
inline |
Definition at line 41 of file ofstream.h.
|
inline |
Definition at line 42 of file ofstream.h.
void MR::File::OFStream::open | ( | const std::string & | path, |
const std::ios_base::openmode | mode = std::ios_base::out|std::ios_base::binary |
||
) |