code: func (w *tWriter) finish() (f *tFile, err error) {
  	defer w.close()
  	err = w.tw.Close()
  	if err != nil {
  		return
  	}
  	if !w.t.noSync {
  		err = w.w.Sync()
  		if err != nil {
  			return
  		}
  	}
  	f = newTableFile(w.fd, int64(w.tw.BytesLen()), internalKey(w.first), internalKey(w.last))
  	return
  }
docs: // Finalizes the table and returns table file.