Skip to content

Commit ee6ccef

Browse files
TrottMylesBorins
authored andcommitted
doc: clarify O_EXCL text in fs.md
PR-URL: #34096 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent 05a69e2 commit ee6ccef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/fs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5817,10 +5817,10 @@ are available from `fs.constants`. On Windows, flags are translated to
58175817
their equivalent ones where applicable, e.g. `O_WRONLY` to `FILE_GENERIC_WRITE`,
58185818
or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by `CreateFileW`.
58195819

5820-
The exclusive flag `'x'` (`O_EXCL` flag in open(2)) ensures that path is newly
5821-
created. On POSIX systems, path is considered to exist even if it is a symlink
5822-
to a non-existent file. The exclusive flag may or may not work with network
5823-
file systems.
5820+
The exclusive flag `'x'` (`O_EXCL` flag in open(2)) causes the operation to
5821+
return an error if the path already exists. On POSIX, if the path is a symbolic
5822+
link, using `O_EXCL` returns an error even if the link is to a path that does
5823+
not exist. The exclusive flag may or may not work with network file systems.
58245824

58255825
On Linux, positional writes don't work when the file is opened in append mode.
58265826
The kernel ignores the position argument and always appends the data to

0 commit comments

Comments
 (0)