Method: Shining::FileMethods#copy
- Defined in:
- lib/ext/filemethods.rb
#copy(from, to) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/ext/filemethods.rb', line 26 def copy from, to Shining.say(" #{"Copying".color(:blue).bright}\t#{from} to #{to}") { Dir[from].each do |something| File.directory?(something) ? FileUtils.cp_r(something, to) : FileUtils.cp(something, to) end } end |