Skip to content

Commit a46a1f6

Browse files
committed
fixup
1 parent 7ba5500 commit a46a1f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/fs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7564,11 +7564,11 @@ of one before invoking the other:
75647564
```mjs
75657565
import { rename, stat } from 'node:fs/promises';
75667566
7567-
const fromDir = '/tmp/hello';
7568-
const toDir = '/tmp/world';
7567+
const oldPath = '/tmp/hello';
7568+
const newPath = '/tmp/world';
75697569
75707570
try {
7571-
await rename(fromDir, toDir);
7571+
await rename(oldPath, newPath);
75727572
const stats = await stat(toDir);
75737573
console.log(`stats: ${JSON.stringify(stats)}`);
75747574
} catch (error) {
@@ -7579,10 +7579,10 @@ try {
75797579
```cjs
75807580
const { rename, stat } = require('node:fs/promises');
75817581
7582-
(async function(fromDir, toDir) {
7582+
(async function(oldPath, newPath) {
75837583
try {
7584-
await rename(fromDir, toDir);
7585-
const stats = await stat(toDir);
7584+
await rename(oldPath, newPath);
7585+
const stats = await stat(newPath);
75867586
console.log(`stats: ${JSON.stringify(stats)}`);
75877587
} catch (error) {
75887588
console.error('there was an error:', error.message);

0 commit comments

Comments
 (0)