Skip to content

Commit 35a4e21

Browse files
committed
doc: clarify copyFile symlink behavior
1 parent 4744070 commit 35a4e21

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

doc/api/fs.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,10 @@ changes:
12681268
Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
12691269
already exists.
12701270
1271+
Symbolic links are followed. If `src` is a symbolic link, the target file is
1272+
copied. If `dest` is a symbolic link, the target file is overwritten unless
1273+
`mode` contains `fs.constants.COPYFILE_EXCL`.
1274+
12711275
No guarantees are made about the atomicity of the copy operation. If an
12721276
error occurs after the destination file has been opened for writing, an attempt
12731277
will be made to remove the destination.
@@ -2747,6 +2751,10 @@ callback function. Node.js makes no guarantees about the atomicity of the copy
27472751
operation. If an error occurs after the destination file has been opened for
27482752
writing, Node.js will attempt to remove the destination.
27492753
2754+
Symbolic links are followed. If `src` is a symbolic link, the target file is
2755+
copied. If `dest` is a symbolic link, the target file is overwritten unless
2756+
`mode` contains `fs.constants.COPYFILE_EXCL`.
2757+
27502758
`mode` is an optional integer that specifies the behavior
27512759
of the copy operation. It is possible to create a mask consisting of the bitwise
27522760
OR of two or more values (e.g.
@@ -5838,6 +5846,10 @@ already exists. Returns `undefined`. Node.js makes no guarantees about the
58385846
atomicity of the copy operation. If an error occurs after the destination file
58395847
has been opened for writing, Node.js will attempt to remove the destination.
58405848
5849+
Symbolic links are followed. If `src` is a symbolic link, the target file is
5850+
copied. If `dest` is a symbolic link, the target file is overwritten unless
5851+
`mode` contains `fs.constants.COPYFILE_EXCL`.
5852+
58415853
`mode` is an optional integer that specifies the behavior
58425854
of the copy operation. It is possible to create a mask consisting of the bitwise
58435855
OR of two or more values (e.g.

0 commit comments

Comments
 (0)