Method: PSWindows::Exec#mv
- Defined in:
- lib/beaker/host/pswindows/exec.rb
#mv(orig, dest, rm = true) ⇒ Object
Move the origin to destination. The destination is removed prior to moving.
32 33 34 35 36 37 38 |
# File 'lib/beaker/host/pswindows/exec.rb', line 32 def mv(orig, dest, rm=true) # ensure that we have the right slashes for windows orig = orig.gsub(/\//,'\\') dest = dest.gsub(/\//,'\\') rm_rf dest unless !rm execute("move /y #{orig} #{dest}") end |