MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / getFileContents

Function getFileContents

Source/Util/File_Util.cpp:13–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#endif // __linux__
12
13std::string getFileContents(const std::string& filePath)
14{
15 std::ifstream inFile(filePath);
16 std::stringstream stream;
17
18 stream << inFile.rdbuf(); //Gets the file contents into a string stream
19 return stream.str(); //Return the string from the string stream
20}
21
22
23

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected