@@ -7564,12 +7564,12 @@ of one before invoking the other:
75647564```mjs
75657565import { 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
75707570try {
7571- await rename(fromDir, toDir );
7572- const stats = await stat(toDir );
7571+ await rename(oldPath, newPath );
7572+ const stats = await stat(newPath );
75737573 console.log(`stats: ${JSON.stringify(stats)}`);
75747574} catch (error) {
75757575 console.error(' there was an error: ' , error.message);
@@ -7579,10 +7579,10 @@ try {
75797579```cjs
75807580const { 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