📜  fse moveSync 与 copySync - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:56.083000             🧑  作者: Mango

代码示例1
// 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});