IOFile: Add WriteString() method to replace fprintf string writing.

This commit is contained in:
Admiral H. Curtiss 2020-11-25 02:59:42 +01:00
parent ee06963644
commit 9c590e215f

View File

@ -7,6 +7,7 @@
#include <cstddef>
#include <cstdio>
#include <string>
#include <string_view>
#include "Common/CommonTypes.h"
@ -67,6 +68,8 @@ public:
return WriteArray(reinterpret_cast<const char*>(data), length);
}
bool WriteString(std::string_view str) { return WriteBytes(str.data(), str.size()); }
bool IsOpen() const { return nullptr != m_file; }
// m_good is set to false when a read, write or other function fails
bool IsGood() const { return m_good; }