Method: Pathname#copy
- Defined in:
- lib/pleasant_path/pathname.rb
#copy(destination) ⇒ Pathname
Copies the file or directory indicated by the Pathname to destination
, in the same manner as FileUtils.cp_r
. Returns destination
as a Pathname.
625 626 627 628 |
# File 'lib/pleasant_path/pathname.rb', line 625 def copy(destination) FileUtils.cp_r(self, destination) destination.to_pathname end |