Method: PSWindows::Exec#mkdir_p
- Defined in:
- lib/beaker/host/pswindows/exec.rb
#mkdir_p(dir) ⇒ Boolean
Create the provided directory structure on the host
74 75 76 77 78 79 |
# File 'lib/beaker/host/pswindows/exec.rb', line 74 def mkdir_p dir windows_dirstring = dir.gsub('/','\\') cmd = "if not exist #{windows_dirstring} (md #{windows_dirstring})" result = exec(Beaker::Command.new(cmd), :acceptable_exit_codes => [0, 1]) result.exit_code == 0 end |