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

Function readFile

examples/threads.cc:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21using namespace wasmtime;
22
23std::string readFile(const char *name) {
24 std::ifstream watFile;
25 watFile.open(name);
26 std::stringstream strStream;
27 strStream << watFile.rdbuf();
28 return strStream.str();
29}
30
31#if defined(WASMTIME_ASAN)
32const int N_THREADS = 1;

Callers 1

mainFunction · 0.70

Calls 2

strMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected