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