Answers for "fse moveSync vs copySync"

0

fse moveSync vs copySync

// 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});
Posted by: Guest on February-10-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language