sapphirec
The Sapphire documentation
FileIO.h
Go to the documentation of this file.
1
#pragma once
2
#include "
sapphirepch.h
"
3
4
/* Namespace for simple file operations. */
5
namespace
FileIO
6
{
7
/* Helper function to read all of a file's contents. */
8
std::string
read_all
(
const
std::string& filename);
9
/* Helper function to write a string to a file. */
10
void
write_all
(
const
std::string& filename,
const
std::string& contents);
11
/* Return a filename without its extension. */
12
std::string
remove_file_extension
(
const
std::string& filename);
13
}
// namespace FileIO
FileIO
Definition:
FileIO.h:6
FileIO::remove_file_extension
std::string remove_file_extension(const std::string &filename)
Definition:
FileIO.cpp:42
FileIO::write_all
void write_all(const std::string &filename, const std::string &contents)
Definition:
FileIO.cpp:35
FileIO::read_all
std::string read_all(const std::string &filename)
Definition:
FileIO.cpp:9
sapphirepch.h
src
FileIO.h
Generated by
1.9.1