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

Function readFile

examples/fuel.cc:27–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using namespace wasmtime;
26
27std::string readFile(const char *name) {
28 std::ifstream watFile;
29 watFile.open(name);
30 std::stringstream strStream;
31 strStream << watFile.rdbuf();
32 return strStream.str();
33}
34
35const size_t kStoreFuel = 10000;
36

Callers 1

mainFunction · 0.70

Calls 2

strMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected