davglass / cpr

Nodejs cp -R
Other
79 stars 80 forks source link

Copy only changed files #22

Closed slavafomin closed 7 years ago

slavafomin commented 8 years ago

Hello!

I have a project with extremely big directories. It would be a tremendous improvement if cpr would be able to compare files from source and target directory using timestamp and/or filesize.

Thanks!

stefanpenner commented 8 years ago

I am unsure if that is something CPR itself should provide, it really is a different beast.

Although undocumented (although tested), I have a module that supports this: https://github.com/stefanpenner/tree-sync and I use it in cases, where I must maintain some potentially large output dir, instead of just a one-time copy (for which I still use CPR).

It is quite quick, as it also works to minimize extra IO.