MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / readFile

Function readFile

examples/multi.cc:19–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17using namespace wasmtime;
18
19std::string readFile(const char *name) {
20 std::ifstream watFile;
21 watFile.open(name);
22 std::stringstream strStream;
23 strStream << watFile.rdbuf();
24 return strStream.str();
25}
26
27int main() {
28 std::cout << "Initializing...\n";

Callers 1

mainFunction · 0.70

Calls 2

strMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected