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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
FileUtils cp_r
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password