Method: PSWindows::File#file_exist?

Defined in:
lib/beaker/host/pswindows/file.rb

#file_exist?(path) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/beaker/host/pswindows/file.rb', line 18

def file_exist?(path)
  result = exec(Beaker::Command.new("if exist #{path} echo true"), :acceptable_exit_codes => [0, 1])
  result.stdout =~ /true/
end