From e4ac393383c03412638d215892f91102fd3d1607 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 27 Jun 2020 22:22:12 -0700 Subject: [PATCH] doc: clarify O_EXCL text in fs.md PR-URL: https://github.com/nodejs/node/pull/34096 Reviewed-By: Anna Henningsen Reviewed-By: Ujjwal Sharma --- doc/api/fs.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 1a11a2e02ede94..85cc920e8840d1 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -5655,10 +5655,10 @@ are available from `fs.constants`. On Windows, flags are translated to their equivalent ones where applicable, e.g. `O_WRONLY` to `FILE_GENERIC_WRITE`, or `O_EXCL|O_CREAT` to `CREATE_NEW`, as accepted by `CreateFileW`. -The exclusive flag `'x'` (`O_EXCL` flag in open(2)) ensures that path is newly -created. On POSIX systems, path is considered to exist even if it is a symlink -to a non-existent file. The exclusive flag may or may not work with network -file systems. +The exclusive flag `'x'` (`O_EXCL` flag in open(2)) causes the operation to +return an error if the path already exists. On POSIX, if the path is a symbolic +link, using `O_EXCL` returns an error even if the link is to a path that does +not exist. The exclusive flag may or may not work with network file systems. On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to