Emscripten supports libc file system functions and C/C++ code can be written in the normal way.
Code run in a browser environment is sandboxed, and does not have direct access to the local file system. Instead, Emscripten creates a virtual file system that may be preloaded with data or linked to URLs for lazy loading. This affects when synchronous file system functions can be called and how a project is compiled. See the 文件系统概述 for more information.
This can affect how an application using an infinite main loop is written. See Emscripten运行时环境 for more information.