// Size returns the size of the database file. func (d *DB) Size() (int64, error) { v := C.kcdbsize(d.db) if v == -1 { msg := d.LastError() return -1, KCError(fmt.Sprintf("Could not get the size of the file: %s.", msg)) } return int64(v), nil }
func (kc *KCDB) Size() (size uint64, err error) { csize := C.kcdbsize(kc.db) if csize == -1 { err = kc.error() } else { size = uint64(csize) } return }