def cp(src, dst, mkdir: false, owner: nil, mode: nil)
      mkdir_if_necessary(File.dirname(dst)) if mkdir
      FileUtils.cp_r(src, dst, preserve: true, verbose: verbose?)
      chown(dst, owner) if owner && !File.symlink?(dst)
      chmod(dst, mode) if mode
    end
def cp(src, dst, mkdir: false, owner: nil, mode: nil)
      mkdir_if_necessary(File.dirname(dst)) if mkdir
      FileUtils.cp_r(src, dst, preserve: true, verbose: verbose?)
      chown(dst, owner) if owner && !File.symlink?(dst)
      chmod(dst, mode) if mode
    end
Like cp -pr +src+ +dst. If +mkdir+ is true, the dst directoy will be
 created if necessary before the copy. If +owner+ is specified, the
 directory will be chowned to owner. If +mode+ is specified, the
 directory will be chmodded to mode. Like all file commands, the
 operation will be printed out if verbose?.