Sha256: 2e85d4a2db02380c7df667f11118425b69f55a3f35af691d8f0e36bb3b0b1a49

Contents?: true

Size: 543 Bytes

Versions: 35

Compression:

Stored size: 543 Bytes

Contents

module PSWindows::File
  include Beaker::CommandFactory

  def tmpfile(name)
    execute("echo C:\\Windows\\Temp\\#{name}.%RANDOM%")
  end

  def tmpdir(name)
    # generate name
    tmpdirname = execute("echo C:\\Windows\\Temp\\#{name}.%RANDOM%")
    # created named dir
    execute("md #{tmpdirname}")
    tmpdirname
  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

35 entries across 35 versions & 1 rubygems

Version Path
beaker-2.31.0 lib/beaker/host/pswindows/file.rb
beaker-2.30.1 lib/beaker/host/pswindows/file.rb
beaker-2.30.0 lib/beaker/host/pswindows/file.rb
beaker-2.29.1 lib/beaker/host/pswindows/file.rb
beaker-2.29.0 lib/beaker/host/pswindows/file.rb
beaker-2.28.0 lib/beaker/host/pswindows/file.rb
beaker-2.27.0 lib/beaker/host/pswindows/file.rb
beaker-2.26.0 lib/beaker/host/pswindows/file.rb
beaker-2.25.0 lib/beaker/host/pswindows/file.rb
beaker-2.24.0 lib/beaker/host/pswindows/file.rb
beaker-2.23.0 lib/beaker/host/pswindows/file.rb
beaker-2.22.0 lib/beaker/host/pswindows/file.rb
beaker-2.21.0 lib/beaker/host/pswindows/file.rb
beaker-2.20.0 lib/beaker/host/pswindows/file.rb
beaker-2.19.0 lib/beaker/host/pswindows/file.rb
beaker-2.18.3 lib/beaker/host/pswindows/file.rb
beaker-2.18.2 lib/beaker/host/pswindows/file.rb
beaker-2.18.1 lib/beaker/host/pswindows/file.rb
beaker-2.18.0 lib/beaker/host/pswindows/file.rb
beaker-2.17.0 lib/beaker/host/pswindows/file.rb