# File lib/chef/file_cache.rb, line 41 def store(path, contents, perm=0640) validate( { :path => path, :contents => contents }, { :path => { :kind_of => String }, :contents => { :kind_of => String }, } ) file_path_array = File.split(path) file_name = file_path_array.pop cache_path = create_cache_path(File.join(file_path_array)) File.open(File.join(cache_path, file_name), "w", perm) do |io| io.print(contents) end true end