File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7564,11 +7564,11 @@ of one before invoking the other:
7564
7564
```mjs
7565
7565
import { rename, stat } from ' node: fs/ promises' ;
7566
7566
7567
- const fromDir = ' / tmp/ hello' ;
7568
- const toDir = ' / tmp/ world' ;
7567
+ const oldPath = ' / tmp/ hello' ;
7568
+ const newPath = ' / tmp/ world' ;
7569
7569
7570
7570
try {
7571
- await rename(fromDir, toDir );
7571
+ await rename(oldPath, newPath );
7572
7572
const stats = await stat(toDir);
7573
7573
console.log(`stats: ${JSON.stringify(stats)}`);
7574
7574
} catch (error) {
@@ -7579,10 +7579,10 @@ try {
7579
7579
```cjs
7580
7580
const { rename, stat } = require(' node: fs/ promises' );
7581
7581
7582
- (async function(fromDir, toDir ) {
7582
+ (async function(oldPath, newPath ) {
7583
7583
try {
7584
- await rename(fromDir, toDir );
7585
- const stats = await stat(toDir );
7584
+ await rename(oldPath, newPath );
7585
+ const stats = await stat(newPath );
7586
7586
console.log(`stats: ${JSON.stringify(stats)}`);
7587
7587
} catch (error) {
7588
7588
console.error(' there was an error: ' , error.message);
You can’t perform that action at this time.
0 commit comments