Versions in this module Expand all Collapse all v0 v0.1.0 Oct 26, 2024 Changes in this version + func SplitPath(path string) (directory, leaf string) + type DirCache struct + func New(root string, trueRootID string, fs DirCacher) *DirCache + func (dc *DirCache) DirMove(ctx context.Context, srcDC *DirCache, ...) (srcID, srcDirectoryID, srcLeaf, dstDirectoryID, dstLeaf string, err error) + func (dc *DirCache) FindDir(ctx context.Context, path string, create bool) (pathID string, err error) + func (dc *DirCache) FindPath(ctx context.Context, path string, create bool) (leaf, directoryID string, err error) + func (dc *DirCache) FindRoot(ctx context.Context, create bool) error + func (dc *DirCache) Flush() + func (dc *DirCache) FlushDir(dir string) + func (dc *DirCache) FoundRoot() bool + func (dc *DirCache) Get(path string) (id string, ok bool) + func (dc *DirCache) GetInv(id string) (path string, ok bool) + func (dc *DirCache) Put(path, id string) + func (dc *DirCache) ResetRoot() + func (dc *DirCache) RootID(ctx context.Context, create bool) (ID string, err error) + func (dc *DirCache) RootParentID(ctx context.Context, create bool) (ID string, err error) + func (dc *DirCache) SetRootIDAlias(rootID string) + func (dc *DirCache) String() string + type DirCacher interface + CreateDir func(ctx context.Context, pathID, leaf string) (newID string, err error) + FindLeaf func(ctx context.Context, pathID, leaf string) (pathIDOut string, found bool, err error)