otiai10 / copy

Go copy directory recursively
https://pkg.go.dev/github.com/otiai10/copy
MIT License
713 stars 115 forks source link

Can we support Update Opt, like --update in `cp` #74

Open xiantang opened 2 years ago

xiantang commented 2 years ago

HiHi, copy is every easy to use, but have a feature to request.

I have a lot of files need to copy from one folder to anther folder, the source folder have several files changed between dest folder.

It will cause poor performance when we just want update several files to dest folder.

So I want copy to support Update Opt like cp in Linux:

-u, --update
              copy only when the SOURCE file is newer than the destination file or when the destination file is missing
otiai10 commented 2 years ago

sounds great, let me tackle