Module: Aix::File

Includes:
Beaker::CommandFactory
Included in:
Host
Defined in:
lib/beaker/host/aix/file.rb

Instance Attribute Summary

Attributes included from Beaker::CommandFactory

#assertions

Instance Method Summary collapse

Methods included from Beaker::CommandFactory

#execute, #fail_test

Instance Method Details

#path_split(paths) ⇒ Object



12
13
14
# File 'lib/beaker/host/aix/file.rb', line 12

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

#tmpdir(name = '') ⇒ Object



8
9
10
# File 'lib/beaker/host/aix/file.rb', line 8

def tmpdir(name = '')
  execute("rndnum=${RANDOM} && mkdir /tmp/#{name}.${rndnum} && echo /tmp/#{name}.${rndnum}")
end

#tmpfile(name = '', extension = nil) ⇒ Object



4
5
6
# File 'lib/beaker/host/aix/file.rb', line 4

def tmpfile(name = '', extension = nil)
  execute("rndnum=${RANDOM} && touch /tmp/#{name}.${rndnum}#{extension} && echo /tmp/#{name}.${rndnum}#{extension}")
end