Reputation: 5457
Is there a way to get ruby to do a forced copy? FileUtils.cp_r seems not to have a :force => true option.
Upvotes: 7
Views: 4901
Reputation: 26973
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.
Upvotes: 4
Reputation: 23880
No, but it does have :remove_destination
as an option, which does much the same thing.
Upvotes: 12