    # File lib/chef/provider/link.rb, line 117
          def action_create
            if @current_resource.to != ::File.expand_path(@new_resource.to, @new_resource.target_file)
              if @new_resource.link_type == :symbolic
                unless (::File.symlink?(@new_resource.target_file) && ::File.readlink(@new_resource.target_file) == @new_resource.to)
                  if ::File.symlink?(@new_resource.target_file) || ::File.exist?(@new_resource.target_file)
                    ::File.unlink(@new_resource.target_file)
                  end
                  ::File.symlink(@new_resource.to,@new_resource.target_file)
                  Chef::Log.debug("#{@new_resource} created #{@new_resource.link_type} link from #{@new_resource.to} -> #{@new_resource.target_file}")
                  Chef::Log.info("#{@new_resource} created")
                end
              elsif @new_resource.link_type == :hard
                ::File.link(@new_resource.to, @new_resource.target_file)
                Chef::Log.debug("#{@new_resource} created #{@new_resource.link_type} link from #{@new_resource.to} -> #{@new_resource.target_file}")
                Chef::Log.info("#{@new_resource} created")
              end
              @new_resource.updated_by_last_action(true)
            end
            if @new_resource.link_type == :symbolic
              set_owner unless @new_resource.owner.nil?
              set_group unless @new_resource.group.nil?
            end
          end