MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / read_file

Function read_file

dependencies/httplib/httplib.h:2107–2114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2105}
2106
2107inline void read_file(const std::string &path, std::string &out) {
2108 std::ifstream fs(path, std::ios_base::binary);
2109 fs.seekg(0, std::ios_base::end);
2110 auto size = fs.tellg();
2111 fs.seekg(0);
2112 out.resize(static_cast<size_t>(size));
2113 fs.read(&out[0], static_cast<std::streamsize>(size));
2114}
2115
2116inline std::string file_extension(const std::string &path) {
2117 std::smatch m;

Callers 1

handle_file_requestMethod · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected