projeto-hit/TEST_SERVER1/test/whats/helpers/copyFolder.js

17 lines
394 B
JavaScript
Raw Permalink Normal View History

const fsPromises = require("fs/promises");
const fs = require('fs-extra')
// Delete a directory and its children
function copyFolder(sourcePath, destPath) {
fs.copySync(sourcePath, destPath, { overwrite: true }, (err) => {
if (err) {
console.error(err);
} else {
console.log("Copy dir success!");
}
});
}
module.exports = copyFolder;