Ruby have FileUtils with cp, cp_r, having options like verbose, noop etc. Is there any way to do cp -a in a clean way like that? I want to preserve attributes, especially dates.
Try using it with the preserve option set:
FileUtils.cp_r(source, dest, preserve: true)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With