# File lib/kirbybase.rb, line 3463
    def rebuild(fptr)
        @idx_arr.clear

        encrypted = @table.encrypted?

        # Skip header rec.

        fptr.readline

        begin
            # Loop through table.

            while true
                line = fptr.readline

                line = unencrypt_str(line) if encrypted
                line.strip!

                # If blank line (i.e. 'deleted'), skip it.

                next if line == ''

                # Split the line up into fields.

                rec = line.split('|', @col_poss.max+2)

                append_new_rec_to_index_array(rec)
            end
        # Here's how we break out of the loop...

        rescue EOFError
        end
    
        @last_update = Time.new
    end