Sha256: 6d651587df4de6baac7264fe59951a9f1bbe17dffce2665e0cfe236abf5fa867

Contents?: true

Size: 513 Bytes

Versions: 64

Compression:

Stored size: 513 Bytes

Contents

module PSWindows::File
  include Beaker::CommandFactory

  def tmpfile(name)
    result = exec(powershell('[System.IO.Path]::GetTempFileName()'))
    result.stdout.chomp()
  end

  def tmpdir(name)
    result = exec(powershell('[System.IO.Path]::GetTempPath()'))
    result.stdout.chomp()
  end

  def path_split(paths)
    paths.split(';')
  end

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

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
beaker-3.37.0 lib/beaker/host/pswindows/file.rb
beaker-3.36.0 lib/beaker/host/pswindows/file.rb
beaker-3.35.0 lib/beaker/host/pswindows/file.rb
beaker-3.34.0 lib/beaker/host/pswindows/file.rb
beaker-3.33.0 lib/beaker/host/pswindows/file.rb
beaker-3.32.0 lib/beaker/host/pswindows/file.rb
beaker-3.31.0 lib/beaker/host/pswindows/file.rb
beaker-3.30.0 lib/beaker/host/pswindows/file.rb
beaker-3.29.0 lib/beaker/host/pswindows/file.rb
beaker-3.28.0 lib/beaker/host/pswindows/file.rb
beaker-3.27.0 lib/beaker/host/pswindows/file.rb
beaker-3.26.0 lib/beaker/host/pswindows/file.rb
beaker-3.25.0 lib/beaker/host/pswindows/file.rb
beaker-3.24.0 lib/beaker/host/pswindows/file.rb
beaker-3.23.0 lib/beaker/host/pswindows/file.rb
beaker-3.22.0 lib/beaker/host/pswindows/file.rb
beaker-3.21.1 lib/beaker/host/pswindows/file.rb
beaker-3.21.0 lib/beaker/host/pswindows/file.rb
beaker-3.20.0 lib/beaker/host/pswindows/file.rb
beaker-3.19.0 lib/beaker/host/pswindows/file.rb