2022-03-11 16:00:09 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
|
2022-06-08 18:19:01 +00:00
|
|
|
/* Namespace for simple file operations. */
|
2022-06-08 18:19:27 +00:00
|
|
|
namespace FileIO
|
2022-03-11 16:00:09 +00:00
|
|
|
{
|
2022-06-08 18:19:01 +00:00
|
|
|
/* Helper function to read all of a file's contents. */
|
2022-03-11 16:00:09 +00:00
|
|
|
std::string read_all(const std::string& filename);
|
2022-06-08 18:19:01 +00:00
|
|
|
/* Helper function to write a string to a file. */
|
2022-03-11 16:00:09 +00:00
|
|
|
void write_all(const std::string& filename, const std::string& contents);
|
|
|
|
}
|