src/server/pkg/hashtree/db.go
func NewChildCursor(tx *bolt.Tx, path string) *ChildCursor {
	path = clean(path)
	c := fs(tx).Cursor()
	dir := b(path)
	k, v := c.Seek(append(dir, nullByte[0]))
	if !bytes.Equal(dir, nullByte) {
		dir = append(dir, nullByte[0])
	}
	if !bytes.HasPrefix(k, dir) {
		k, v = nil, nil
	}
	return &ChildCursor{
		c:   c,
		dir: dir,
		k:   k,
		v:   v,
	}
}
func NewChildCursor(tx *bolt.Tx, path string) *ChildCursor {
	path = clean(path)
	c := fs(tx).Cursor()
	dir := b(path)
	k, v := c.Seek(append(dir, nullByte[0]))
	if !bytes.Equal(dir, nullByte) {
		dir = append(dir, nullByte[0])
	}
	if !bytes.HasPrefix(k, dir) {
		k, v = nil, nil
	}
	return &ChildCursor{
		c:   c,
		dir: dir,
		k:   k,
		v:   v,
	}
}
// NewChildCursor creates a new child cursor.