Created
September 8, 2022 17:58
-
-
Save sabesansathananthan/8b7a3a927470da359b6e9a5c6e51d89d to your computer and use it in GitHub Desktop.
How to copy files and folders in Node.js?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy directory | |
fs.cp('./component', './page', { recursive: true }, (err) => { | |
if (err) { | |
console.error(err); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment