Forum: Ruby FileUtils cp_r

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Newb N. (Guest)
on 2009-04-25 10:12

i want to copy a folder recursively

i did it using cp_r(source,destination)

it works correctly.

but it sould not be overwritted...

how can i do it pls help me..

even i used remove_destination => false...

but it gets overwritted...

any advices...

Hunt J. (Guest)
on 2009-04-25 19:35
(Received via mailing list)
Maybe you can use

unless File.exists?(destination) or Dir.exists?(desitination)
This topic is locked and can not be replied to.