Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add err param to fs.copyFile callback #53234

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,7 @@ changes:
* `dest` {string|Buffer|URL} destination filename of the copy operation
* `mode` {integer} modifiers for copy operation. **Default:** `0`.
* `callback` {Function}
* `err` {Error}

Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
already exists. No arguments other than a possible exception are given to the
Expand Down Expand Up @@ -2476,6 +2477,7 @@ changes:
* `verbatimSymlinks` {boolean} When `true`, path resolution for symlinks will
be skipped. **Default:** `false`
* `callback` {Function}
* `err` {Error}

Asynchronously copies the entire directory structure from `src` to `dest`,
including subdirectories and files.
Expand Down
4 changes: 2 additions & 2 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2984,7 +2984,7 @@ function mkdtempSync(prefix, options) {
* @param {string | Buffer | URL} src
* @param {string | Buffer | URL} dest
* @param {number} [mode]
* @param {() => any} callback
* @param {(err?: Error) => any} callback
* @returns {void}
*/
function copyFile(src, dest, mode, callback) {
Expand Down Expand Up @@ -3030,7 +3030,7 @@ function copyFileSync(src, dest, mode) {
* @param {string | URL} src
* @param {string | URL} dest
* @param {object} [options]
* @param {() => any} callback
* @param {(err?: Error) => any} callback
* @returns {void}
*/
function cp(src, dest, options, callback) {
Expand Down