AvianFlu / ncp

Asynchronous recursive file copying with Node.js.
MIT License
680 stars 103 forks source link

Option for synchronous? #103

Open mm-gmbd opened 8 years ago

mm-gmbd commented 8 years ago

First, thanks for the great tool.

I'm using ncp to copy all contents of one folder to another, and have created a gulp task to do so. I would like to include this gulp task in the middle of a sequence of gulp tasks (using runSequence), but considering it is asynchronous, the next gulp task in the sequence begins before ncp is complete, causing problems. An option to make the call synchronous would be great.

nodkz commented 8 years ago

UP +1

nodkz commented 8 years ago

Found better lib https://www.npmjs.com/package/fs-extra#copy It has copySync.

BTW this lib cover rimraf module, which remove non empty dirs.