Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FileUtils.hxx
Go to the documentation of this file.
1
35#ifndef _UTILS_FILEUTILS_HXX_
36#define _UTILS_FILEUTILS_HXX_
37
38#include <string>
39
48string read_file_to_string(const string &filename);
49
56void write_string_to_file(const string &filename, const string &data);
57
58#endif //_UTILS_FILEUTILS_HXX_
string read_file_to_string(const string &filename)
Opens a file, reads the entire contents, stores it in a c++ std::string and returns this string.
Definition FileUtils.cxx:78
void write_string_to_file(const string &filename, const string &data)
Opens (or creates) a file, truncates it and overwrites the contents with what is given in a string.