Method: Unix::Exec#mv

Defined in:
lib/beaker/host/unix/exec.rb

#mv(orig, dest, rm = true) ⇒ Object

Move the origin to destination. The destination is removed prior to moving.

Parameters:

  • The origin path

  • the destination path

  • (defaults to: true)

    Remove the destination prior to move



166
167
168
169
# File 'lib/beaker/host/unix/exec.rb', line 166

def mv orig, dest, rm = true
  rm_rf dest unless !rm
  execute("mv #{orig} #{dest}")
end