Sha256: 23173ebf813c01e04d378082d71ce28457326af170b64e6a3d68428d080d114d

Contents?: true

Size: 523 Bytes

Versions: 27

Compression:

Stored size: 523 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

27 entries across 27 versions & 1 rubygems

Version Path
beaker-4.22.1 lib/beaker/host/pswindows/file.rb
beaker-4.22.0 lib/beaker/host/pswindows/file.rb
beaker-4.21.0 lib/beaker/host/pswindows/file.rb
beaker-4.20.0 lib/beaker/host/pswindows/file.rb
beaker-4.19.0 lib/beaker/host/pswindows/file.rb
beaker-4.18.0 lib/beaker/host/pswindows/file.rb
beaker-4.17.0 lib/beaker/host/pswindows/file.rb
beaker-4.16.0 lib/beaker/host/pswindows/file.rb
beaker-4.15.0 lib/beaker/host/pswindows/file.rb
beaker-4.14.1 lib/beaker/host/pswindows/file.rb
beaker-4.14.0 lib/beaker/host/pswindows/file.rb
beaker-4.13.1 lib/beaker/host/pswindows/file.rb
beaker-4.13.0 lib/beaker/host/pswindows/file.rb
beaker-4.12.0 lib/beaker/host/pswindows/file.rb
beaker-4.11.1 lib/beaker/host/pswindows/file.rb
beaker-4.11.0 lib/beaker/host/pswindows/file.rb
beaker-4.10.0 lib/beaker/host/pswindows/file.rb
beaker-4.9.0 lib/beaker/host/pswindows/file.rb
beaker-4.8.0 lib/beaker/host/pswindows/file.rb
beaker-4.7.0 lib/beaker/host/pswindows/file.rb