The copy method will copy a file to a new name or location. It has an
optional flag parameter to write error messages to standard error. The
UNIX-like name cp is an alias.
require “fileutils”
Copy epsilon to theta and log any errors.
FileUtils.copy(“epsilon”,“theta”, true)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.