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

[12.x] doc: update fs promise-based examples #35760

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/fs.md
Expand Up @@ -60,7 +60,7 @@ Promise-based operations return a `Promise` that is resolved when the
asynchronous operation is complete.

```js
const fs = require('fs/promises');
const fs = require('fs').promises;

(async function(path) {
try {
Expand Down Expand Up @@ -106,7 +106,7 @@ fs.rename('/tmp/hello', '/tmp/world', (err) => {
Or, use the promise-based API:

```js
const fs = require('fs/promises');
const fs = require('fs').promises;

(async function(from, to) {
try {
Expand Down