Is there a method to copy a folder from one place to another?
I used the method:
fs.copyFileSync()
However, it copies only files.
Is there a way for me to copy a folder from one location to another?
Is there a method to copy a folder from one place to another?
I used the method:
fs.copyFileSync()
However, it copies only files.
Is there a way for me to copy a folder from one location to another?
you can use exec function to execute an os command
const { exec } = require('child_process');
exec('cp -r <sorceFolderPath> <destFolderPath>', (err, stdout, stderr) => {
}
this may differ with OS