I'm looking for something like..
fs.copy([dir1,dir2], 'destDirString').then(() => {
cb();
});
Is there an easy way to copy two directories' contents to another dir in Node? I have two NCP commands now, want to condense.
I'm looking for something like..
fs.copy([dir1,dir2], 'destDirString').then(() => {
cb();
});
Is there an easy way to copy two directories' contents to another dir in Node? I have two NCP commands now, want to condense.
you might be looking for merge-dirs
Usage:
var mergedirs = require('merge-dirs');
// copy folder/a into folder/b
mergedirs('/folder/a', '/folder/b');
// copy folder/a into folder/b with conflict resolution 'overwrite'
mergedirs('/folder/a', '/folder/b', 'overwrite');
// copy folder/a into folder/b with conflict resolution 'ask'
mergedirs('/folder/a', '/folder/b', 'ask');
// copy folder/a into folder/b with conflict resolution 'skip'
mergedirs('/folder/a', '/folder/b', 'skip');