func (gdc *GlobalDirectoryContext) LookupDirectory(blobDigest digest.Digest, out *fuse.Attr) re_fuse.Directory {
	d := cd_fuse.NewContentAddressableStorageDirectory(
		&directoryContext{
			GlobalDirectoryContext: gdc,
			digest:                 blobDigest,
		},
		blobDigest.GetInstanceName(),
		gdc.GetDirectoryInodeNumber(blobDigest))
	d.FUSEGetAttr(out)
	return d
}
LookupDirectory creates a directory corresponding with the
remoteexecution.Digest message of a given digest.
package main
import (
	remoteexecution "github.com/bazelbuild/remote-apis/build/bazel/remote/execution/v2"
	cd_fuse "github.com/buildbarn/bb-clientd/pkg/filesystem/fuse"
	re_cas "github.com/buildbarn/bb-remote-execution/pkg/cas"
	re_fuse "github.com/buildbarn/bb-remote-execution/pkg/filesystem/fuse"
	"github.com/buildbarn/bb-storage/pkg/digest"
	"github.com/buildbarn/bb-storage/pkg/util"
	"github.com/hanwen/go-fuse/v2/fuse"
)
type GlobalDirectoryContext struct {
	*GlobalFileContext
	directoryFetcher         re_cas.DirectoryFetcher
	directoryInodeNumberTree re_fuse.InodeNumberTree
}
func NewGlobalDirectoryContext(globalFileContext *GlobalFileContext, directoryFetcher re_cas.DirectoryFetcher) *GlobalDirectoryContext {
	return &GlobalDirectoryContext{
		GlobalFileContext:        globalFileContext,
		directoryFetcher:         directoryFetcher,
		directoryInodeNumberTree: re_fuse.NewRandomInodeNumberTree(),
	}
}
func (gdc *GlobalDirectoryContext) GetDirectoryInodeNumber(blobDigest digest.Digest) uint64 {
	return gdc.directoryInodeNumberTree.AddString(blobDigest.GetKey(digest.KeyWithInstance)).Get()
}