[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

FileUtils cp_r

Newb Newb

4/25/2009 6:12:00 AM

Hi...

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...

Thanks
--
Posted via http://www.ruby-....

1 Answer

Hunt Jon

4/25/2009 3:35:00 PM

0

Maybe you can use

unless File.exists?(destination) or Dir.exists?(desitination)
cp_r(source,destination)
end