Copy entire directories, safely. All work is done by pump
and tar-fs
. Thanks 2 mafintosh.
npm install --save pump-dir
var pumpDir = require('pump-dir')
pumpDir('./node_modules', 'clone_modules', function (err) {
if (err) return console.error(err)
console.log('cloned node_modules')
})
Copy a directory. opts.ignore
can be a predicate method by which all entries will be filtered. Must return true
for files that shall be excluded, sig opts.ignore(name, headers)
, see tar-fs
. Calling back like callback(err)
.