Module: Chef::Sugar::FileSystem

Extended by:
FileSystem
Included in:
FileSystem
Defined in:
lib/chef/sugar/dip/file_system.rb

Instance Method Summary collapse

Instance Method Details

#tmp(path = nil) ⇒ Object

Returns temporary storage path, with optional appended string

Examples:

create file path to download file to


tmp('elasticsearch/v2.0.0.tar.gz')
=> /var/chef/cache/elasticsearch/v2.0.0.tar.gz

Parameters:

  • path (String) (defaults to: nil)

    a string that is appended to the temporary path



33
34
35
# File 'lib/chef/sugar/dip/file_system.rb', line 33

def tmp(path = nil)
  File.join(*[Chef::Config[:file_cache_path], path].compact)
end