Method: Chef::Provider::File#update_new_file_state

Defined in:
lib/chef/provider/file.rb

#update_new_file_state(path = @new_resource.path) ⇒ Object

if you are using a tempfile before creating, you must override the default with the tempfile, since the file at @new_resource.path will not be updated on converge



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/chef/provider/file.rb', line 201

def update_new_file_state(path=@new_resource.path)
  if !::File.directory?(path) 
    @new_resource.checksum(checksum(path))
  end

  if Chef::Platform.windows?
    # TODO: To work around CHEF-3554, add support for Windows
    # equivalent, or implicit resource reporting won't work for
    # Windows.
    return
  end

  acl_scanner = ScanAccessControl.new(@new_resource, @new_resource)
  acl_scanner.set_all!
end