📅  最后修改于: 2022-03-11 15:01:56.083000             🧑  作者: Mango
// Does NOT delete files that exist in targetDir but do not exist in srcDir
fse.copySync(srcDir, targetDir, {overwrite: true});
// Does delete files that exist in targetDir but do not exist in srcDir
// Use if you want targetDir === srcDir
fse.moveSync(srcDir, targetDir, {overwrite: true});