# File lib/kirbybase.rb, line 939 def new_table(name, field_defs, encrypt, record_class) # Header rec consists of last record no. used, delete count, and # all field names/types. Here, I am inserting the 'recno' field # at the beginning of the fields. header_rec = ['000000', '000000', record_class, 'recno:Integer', field_defs].join('|') header_rec = 'Z' + encrypt_str(header_rec) if encrypt begin fptr = open(File.join(@db.path, name.to_s + @db.ext), 'w') fptr.write(header_rec + "\n") ensure fptr.close end end