Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > What happened to File.copy?

Reply
Thread Tools

What happened to File.copy?

 
 
Ron Coutts
Guest
Posts: n/a
 
      12-18-2003
Did File.copy and File.cp disappear sometime between Ruby 1.6 and 1.8?
Is there an alternative in 1.8?

Ron



 
Reply With Quote
 
 
 
 
Hal Fulton
Guest
Posts: n/a
 
      12-18-2003
Ron Coutts wrote:
> Did File.copy and File.cp disappear sometime between Ruby 1.6 and 1.8?
> Is there an alternative in 1.8?


#copy is not in the core, it's in the ftools library.

Hal


 
Reply With Quote
 
 
 
 
Gennady
Guest
Posts: n/a
 
      12-18-2003
require 'ftools'

Ron Coutts wrote:

> Did File.copy and File.cp disappear sometime between Ruby 1.6 and 1.8?
> Is there an alternative in 1.8?
>
> Ron
>
>



 
Reply With Quote
 
Florian Frank
Guest
Posts: n/a
 
      12-18-2003
On Thu, 2003-12-18 at 23:48, Ron Coutts wrote:
> Did File.copy and File.cp disappear sometime between Ruby 1.6 and 1.8?
> Is there an alternative in 1.8?


Try to require 'fileutils' and use FileUtils.cp or FileUtils.copy
instead.

--
o=lambda{|o|p o};O=Struct.new(:a,:b,:c);e=%q(_(?h,_(?h,_(?\ ,_(?s,_(?u,_(74)),
_(?t)),_(?t,_(?o,_(?n,_(?a))))),_(82,_(?r,_(?e),_( 32)),_(32,_(98,_(?u),_(?y)))
)),_(?r,_(99,_(97),_(?k,nil,_(?e))),_(10))));def _(*a)O.new(*a)end;class O;def
e(&o)b&&b.e(&o);o[a];c&&c.e(&o)end;end;def p(o)print(''<<o)end;eval(e).e(&o)



 
Reply With Quote
 
Florian Frank
Guest
Posts: n/a
 
      12-18-2003
On Thu, 2003-12-18 at 23:56, Hal Fulton wrote:
> #copy is not in the core, it's in the ftools library.
>
> Hal


AFAIK ftools.rb is obsolete now, it's mentioned on the "old" list here:

http://www.rubygarden.org/ruby?RubyL...ibrariesAreOld

--
o=lambda{|o|p o};O=Struct.new(:a,:b,:c);e=%q(_(?h,_(?h,_(?\ ,_(?s,_(?u,_(74)),
_(?t)),_(?t,_(?o,_(?n,_(?a))))),_(82,_(?r,_(?e),_( 32)),_(32,_(98,_(?u),_(?y)))
)),_(?r,_(99,_(97),_(?k,nil,_(?e))),_(10))));def _(*a)O.new(*a)end;class O;def
e(&o)b&&b.e(&o);o[a];c&&c.e(&o)end;end;def p(o)print(''<<o)end;eval(e).e(&o)


 
Reply With Quote
 
Hal Fulton
Guest
Posts: n/a
 
      12-19-2003
Florian Frank wrote:
> On Thu, 2003-12-18 at 23:56, Hal Fulton wrote:
>
>>#copy is not in the core, it's in the ftools library.
>>
>>Hal

>
>
> AFAIK ftools.rb is obsolete now, it's mentioned on the "old" list here:
>
> http://www.rubygarden.org/ruby?RubyL...ibrariesAreOld


Thanks. I think I liked it better the other way.
Doesn't really matter.

Hal






 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modding, Where to next? What happened to it? What is it r... Silverstrand Front Page News 0 10-24-2005 01:50 PM
FireFox: What happened?! Robert Firefox 7 11-15-2004 08:20 PM
Wireless Linksys Router Reset--What happened? =?Utf-8?B?TW9yZGlkbw==?= Wireless Networking 1 10-08-2004 11:28 AM
Wot has happened to FireBird Linda Leverno Firefox 1 07-10-2004 06:04 PM
Something Crazy Happened !!! nikoli Firefox 0 12-12-2003 04:22 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57