src/server/pkg/hashtree/db.go
func Walk(rs []io.ReadCloser, walkPath string, f func(path string, node *NodeProto) error) error {
	walkPath = clean(walkPath)
	return nodes(rs, func(path string, node *NodeProto) error {
		if path == "" {
			path = "/"
		}
		if path != walkPath && !strings.HasPrefix(path, walkPath+"/") {
			return nil
		}
		if err := f(path, node); err != nil {
			if err == errutil.ErrBreak {
				return nil
			}
			return err
		}
		return nil
	})
}
func Walk(rs []io.ReadCloser, walkPath string, f func(path string, node *NodeProto) error) error {
	walkPath = clean(walkPath)
	return nodes(rs, func(path string, node *NodeProto) error {
		if path == "" {
			path = "/"
		}
		if path != walkPath && !strings.HasPrefix(path, walkPath+"/") {
			return nil
		}
		if err := f(path, node); err != nil {
			if err == errutil.ErrBreak {
				return nil
			}
			return err
		}
		return nil
	})
}
// Walk executes a callback against every node in the subtree of path.