uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

errlog.cpp (283B)


      1 #include "errlog.hpp"
      2 
      3 void
      4 ErrLog::fclear() const
      5 {
      6     std::ofstream f;
      7     f.open(fpath, std::ofstream::trunc);
      8     f.close();
      9 }
     10 
     11 void
     12 ErrLog::write(std::string&& str) const
     13 {
     14     std::ofstream f;
     15     f.open(fpath, std::ios_base::app);
     16     f << str << std::endl;
     17     f.close();
     18 }