Question
Is there a way to get ruby to do a forced copy? FileUtils.cp_r seems not to have a :force => true option.
Solution
No, but it does have :remove_destination
as an option, which does much the same thing.
OTHER TIPS
If you're using FileUtils.cp
to copy a single file, overwriting the target file if it exists is the default behavior; no "force" or similar option is necessary.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow