otiai10 / copy

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

Symlink copy option to copy a symlink even if the destination of the symlink does not exists #111

Closed ducktype closed 9 months ago

ducktype commented 1 year ago

Currently symlink are copied only if the path pointed by the symlink exists, will be useful to have an option to copy the symlink anyway

otiai10 commented 1 year ago

tell me the reason why it would be helpful

ducktype commented 1 year ago

My use case is to copy a list of files/symlinks that are known to be consistent (eg symlinks point to files in the list) but are out of order (Eg the symlinks could be before the pointed file in the list)

otiai10 commented 1 year ago

ah, interesting. let me think about it