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
104 105 106 107 108 109 |
# File 'lib/beaker/host/pswindows/exec.rb', line 104 def mkdir_p dir normalized_path = dir.tr('/', '\\') result = exec(powershell("New-Item -Path '#{normalized_path}' -ItemType 'directory'"), :acceptable_exit_codes => [0, 1]) result.exit_code == 0 end |