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