src/server/pkg/hashtree/db.go
func Glob(rs []io.ReadCloser, pattern string, f func(string, *NodeProto) error) (retErr error) {
	pattern = clean(pattern)
	g, err := globlib.Compile(pattern, '/')
	if err != nil {
		return errorf(MalformedGlob, err.Error())
	}
	return nodes(rs, func(path string, node *NodeProto) error {
		if g.Match(path) {
			return f(externalDefault(path), node)
		}
		return nil
	})
}
func Glob(rs []io.ReadCloser, pattern string, f func(string, *NodeProto) error) (retErr error) {
	pattern = clean(pattern)
	g, err := globlib.Compile(pattern, '/')
	if err != nil {
		return errorf(MalformedGlob, err.Error())
	}
	return nodes(rs, func(path string, node *NodeProto) error {
		if g.Match(path) {
			return f(externalDefault(path), node)
		}
		return nil
	})
}
// Glob executes a callback for each path that matches the glob pattern.