Now about 2 weeks into learning Ruby and Rails, I've found myself using the File
class a lot for things like File.join
, File.open
, etc. Then I bumped into a need for File.copy
only to find out that no such method exists. A little more looking uncovered Rails' FileUtils
class and now I'm a little confused.
There are differences, of course, but there are also what appear to be redundancies. Is one preferred over the other where there are differences? Why do both exist (is it solely to handle the omissions in the Ruby core class)?
I'd just like to get a feel for how these things work together or conflict so I know how to move forward.
Thanks.