2022-03-11 16:00:09 +00:00
|
|
|
#pragma once
|
2022-06-16 13:56:10 +00:00
|
|
|
#include "sapphirepch.h"
|
2022-03-11 16:00:09 +00:00
|
|
|
|
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-14 14:29:51 +00:00
|
|
|
/* Helper function to read all of a file's contents. */
|
|
|
|
std::string read_all(const std::string& filename);
|
|
|
|
/* Helper function to write a string to a file. */
|
|
|
|
void write_all(const std::string& filename, const std::string& contents);
|
|
|
|
/* Return a filename without its extension. */
|
|
|
|
std::string remove_file_extension(const std::string& filename);
|
|
|
|
} // namespace FileIO
|