File System API
Emscripten provides support for file operations by using the FS library and exposes an API for working with the filesystem. However, it's not included by default when you compile your project because it could increase the file's size significantly. If your C/C++ code uses files, the library will be added automatically. The filesystem types vary based on the execution environment. For example, if you're running code inside a worker, the WORKERFS filesystem can be used. By default, MEMFS is used, which stores the data in memory, and any data written to memory is lost when the page is reloaded. You can read more about the File System API at https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#filesystem-api ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access