Function mrpt::io::file_get_contents

Function Documentation

std::string mrpt::io::file_get_contents(const std::string &fileName)

Loads an entire text file and return its contents as a single std::string.

Note

Relying on C++17 RVO to return a string without worring on return-by-value of big objects.

Throws:

std::runtime_error – On any read error.