MCPcopy Create free account
hub / github.com/defold/defold / SetupFS

Function SetupFS

engine/dlib/src/dlib/testutil.cpp:33–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31{
32
33static void SetupFS()
34{
35 static int first = 1;
36 if (!first)
37 return;
38 first = 0;
39
40#if defined(__EMSCRIPTEN__)
41 // mount the current folder as a NODEFS instance inside of emscripten
42 EM_ASM(
43 try {
44 FS.mkdir('/node_vfs'); // Not yet sure how to use DM_HOSTFS directly
45 FS.mount(NODEFS, { root: '.' }, '/node_vfs');
46 } catch (err) {
47 console.log("Error", err)
48 }
49 );
50#endif
51
52}
53
54const char* MakeHostPath(char* dst, uint32_t dst_len, const char* path)
55{

Callers 4

MakeHostPathFunction · 0.85
MakeHostPathfFunction · 0.85
ReadFileFunction · 0.85
ReadHostFileFunction · 0.85

Calls 2

mountMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected