| |
|
Rename Folder Node.js
Rename Folder Node.js
When we say about the name a folder in Node.js, we use fs.rename() or fs.renameSync() or fs.renameSync() or fsPromises.rename() to do operation on a folder to renmae. Here first parameter is current path and second path is new path.
We have create a file with code and name the file ChangeFoldername.js. And we use this code to rename the folder:-
And for fs.renamesync() which is synchronous version
And for fsPromises.rename() is the promise-based version
| |
|
|
|
|