# File lib/chef/provider/file.rb, line 127 def load_current_resource # Every child should be specifying their own constructor, so this # should only be run in the file case. @current_resource ||= Chef::Resource::File.new(@new_resource.name) @new_resource.path.gsub!(/\\/, "/") # for Windows @current_resource.path(@new_resource.path) if !::File.directory?(@new_resource.path) if ::File.exist?(@new_resource.path) if @action != :create_if_missing @current_resource.checksum(checksum(@new_resource.path)) end end end load_current_resource_attrs setup_acl @current_resource end