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:
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 );
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
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);
You can’t perform that action at this time.
0 commit comments