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 File System Overview for more information.
This can affect how an application using an infinite main loop is written. See Emscripten Runtime Environment for more information.