File.copy for 1.9

R

Roger Pack

I am a little lost as to where to find File.copy for 1.9

This worked in 1.8.6
require 'ftools'
File.copy('filename', 'dest_dir')

and in 1.9 is it this?

require 'fileutils'
File.copy_stream('filename', 'dest_name')

Did File.copy('name', 'dest_dir') disappear?
Thanks!
-=r
 
L

Luis Lavena

I am a little lost as to where to find File.copy for 1.9

This worked in 1.8.6
require 'ftools'
File.copy('filename', 'dest_dir')

and in 1.9 is it this?

require 'fileutils'
File.copy_stream('filename', 'dest_name')

Did File.copy('name', 'dest_dir') disappear?

ftools has been deprecated in 1.9

Use FileUtils.cp instead.
 
S

Sam

Roger said:
I am a little lost as to where to find File.copy for 1.9

This worked in 1.8.6
require 'ftools'
File.copy('filename', 'dest_dir')

and in 1.9 is it this?

require 'fileutils'
File.copy_stream('filename', 'dest_name')

Did File.copy('name', 'dest_dir') disappear?
Thanks!
-=r

require 'fileutils'
Fileutils.cp source, dest
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top