Skip to content

Commit ea13106

Browse files
authored
[Docs] Add note about casing inconsistencies in JS APIs (#19632)
1 parent 9de0509 commit ea13106

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

site/source/docs/api_reference/Filesystem-API.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ NODERAWFS
8484

8585
.. note:: This file system is only for use when running inside :term:`node.js`.
8686

87-
This is a special backend as it replaces all normal filesystem access with direct Node.js operations, without the need to do `FS.mount()`. The initial working directory will be same as process.cwd() instead of VFS root directory. Because this mode directly uses Node.js to access the real local filesystem on your OS, the code will not necessarily be portable between OSes - it will be as portable as a Node.js program would be, which means that differences in how the underlying OS handles permissions and errors and so forth may be noticeable. This has mostly been tested on Linux so far.
88-
87+
This is a special backend as it replaces all normal filesystem access with direct Node.js operations, without the need to do `FS.mount()`. The initial working directory will be same as process.cwd() instead of VFS root directory. Because this mode directly uses Node.js to access the real local filesystem on your OS, the code will not necessarily be portable between OSes - it will be as portable as a Node.js program would be, which means that differences in how the underlying OS handles permissions and errors and so forth may be noticeable. This has mostly been tested on Linux so far.
88+
8989
See `this <https://github.com/emscripten-core/emscripten/blob/d936e807c4d7a6163827c1fdc4a8e87abe41db44/tests/fs/test_nodefs_rw.c#L31>`_ section on NODEFS, where you can see a mount operation - this is not needed in NODERAWFS.
9090

9191
.. _filesystem-api-idbfs:
@@ -180,6 +180,7 @@ By default:
180180
File system API
181181
===============
182182

183+
.. note:: Functions derived from libc like ``FS.readdir()`` use all-lowercase names, whereas added functions like ``FS.readFile()`` use camelCase names.
183184

184185
.. js:function:: FS.mount(type, opts, mountpoint)
185186

0 commit comments

Comments
 (0)