20 return std::make_pair(
false,
"");
29 return std::make_pair(
false,
"");
31 retval.append(buffer, buffer+n);
34 return std::make_pair(
true,
retval);
42 if (
fwrite(data.data(), 1, data.size(),
f) != data.size()) {
FILE * fopen(const fs::path &p, const char *mode)
bool WriteBinaryFile(const fs::path &filename, const std::string &data)
Write contents of std::string to a file.
std::pair< bool, std::string > ReadBinaryFile(const fs::path &filename, size_t maxsize)
Read full contents of a file and return them in a std::string.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.