module Macinbox
Constants
- VERSION
Public Class Methods
copyfiles(from:, to:, recursive: false)
click to toggle source
# File lib/macinbox/copyfiles.rb, line 5 def self.copyfiles(from:, to:, recursive: false) flags = recursive ? ['-R'] : [] src = [*from] dest = [to] begin Task.run %W[ /bin/cp -c ] + flags + src + dest + [{ :err => File::NULL }] rescue Task.run %W[ /bin/cp ] + flags + src + dest end end