bool FLogSource::open(const filesystem::path& path) { Synchronize on(*this); m_path = path.native(); std::fstream log{ m_path, std::ios_base::out | std::ios_base::app }; return log.is_open(); }
bool writepath(filesystem::path& p, char* buf, size_t len, bool binary) { FILE* ofile; ofile = fopen((const char*)(p.native().c_str()), (binary?"wb":"w")); if(fwrite(buf, 1, len, ofile) != len) { fclose(ofile); return false; } fclose(ofile); return true; }