Skip to content
Closed
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
doc: fix fs.promises.copyFile sample code.
  • Loading branch information
kakts committed May 20, 2018
commit 726be355b732e52545cd79da21eef0fe3f4d61fb
3 changes: 2 additions & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3798,7 +3798,8 @@ If the third argument is a number, then it specifies `flags`, as shown in the
following example.

```js
const fsPromises = require('fs').promises;
const fs = require('fs');
const fsPromises = fs.promises;
const { COPYFILE_EXCL } = fs.constants;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fs is undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. 726be35


// By using COPYFILE_EXCL, the operation will fail if destination.txt exists.
Expand Down