    # File lib/chef/provider/remote_file.rb, line 34
          def action_create
            assert_enclosing_directory_exists!

            Chef::Log.debug("#{@new_resource} checking for changes")

            if current_resource_matches_target_checksum?
              Chef::Log.debug("#{@new_resource} checksum matches target checksum (#{@new_resource.checksum}) - not updating")
            else
              Chef::REST.new(@new_resource.source, nil, nil).fetch(@new_resource.source) do |raw_file|
                if matches_current_checksum?(raw_file)
                  Chef::Log.debug "#{@new_resource} target and source checksums are the same - not updating"
                else
                  backup_new_resource
                  FileUtils.cp raw_file.path, @new_resource.path
                  Chef::Log.info "#{@new_resource} updated"
                  @new_resource.updated_by_last_action(true)
                end
              end
            end
            enforce_ownership_and_permissions

            @new_resource.updated_by_last_action?
          end