Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: clarify fs.copyFile() symlink behavior
This PR documents that `fs.copyFile()` always dereferences symbolic links, as requested in #61518.

Fixes: #61518
  • Loading branch information
junnyontop-pixel authored Feb 4, 2026
commit 0460b187de2946c3a006fd5bee4e98bccc79f3a2
7 changes: 7 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2441,6 +2441,13 @@ See the POSIX close(2) documentation for more detail.

### `fs.copyFile(src, dest[, mode], callback)`

Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
already exists.

**Note:** `fs.copyFile()` always dereferences symbolic links. If `src` is a
symbolic link, the contents of the target file will be copied rather than the
link itself.

<!-- YAML
added: v8.5.0
changes:
Expand Down