Skip to content

Commit a661e26

Browse files
committed
doc: undocument fs.open's 'rs' mode
Using O_SYNC with O_RDONLY is basically a noop. Closes: #6730 PR-URL: #6732 Reviewed-By: Ben Noorhduis <[email protected]>
1 parent 9d445bc commit a661e26

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

doc/api/fs.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ An exception occurs if the file does not exist.
753753
* `'r+'` - Open file for reading and writing.
754754
An exception occurs if the file does not exist.
755755

756-
* `'rs'` - Open file for reading in synchronous mode. Instructs the operating
757-
system to bypass the local file system cache.
756+
* `'rs+'` - Open file for reading and writing in synchronous mode. Instructs
757+
the operating system to bypass the local file system cache.
758758

759759
This is primarily useful for opening files on NFS mounts as it allows you to
760760
skip the potentially stale local cache. It has a very real impact on I/O
@@ -763,9 +763,6 @@ An exception occurs if the file does not exist.
763763
Note that this doesn't turn `fs.open()` into a synchronous blocking call.
764764
If that's what you want then you should be using `fs.openSync()`
765765

766-
* `'rs+'` - Open file for reading and writing, telling the OS to open it
767-
synchronously. See notes for `'rs'` about using this with caution.
768-
769766
* `'w'` - Open file for writing.
770767
The file is created (if it does not exist) or truncated (if it exists).
771768

0 commit comments

Comments
 (0)