MCPcopy Index your code
hub / github.com/OpenListTeam/OpenList / deleteDirectoryTree

Method deleteDirectoryTree

internal/op/cache.go:46–56  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

44 cm.deleteDirectoryTree(Key(storage, dirPath))
45}
46func (cm *CacheManager) deleteDirectoryTree(key string) {
47 if dirCache, exists := cm.dirCache.Pop(key); exists {
48 for _, obj := range dirCache.objs {
49 if obj.IsDir() {
50 cm.deleteDirectoryTree(stdpath.Join(key, obj.GetName()))
51 } else {
52 cm.linkCache.DeleteKey(stdpath.Join(key, obj.GetName()))
53 }
54 }
55 }
56}
57
58// remove directory from dirCache
59func (cm *CacheManager) DeleteDirectory(storage driver.Driver, dirPath string) {

Callers 5

DeleteDirectoryTreeMethod · 0.95
removeDirectoryObjectMethod · 0.95
listFunction · 0.80
MoveFunction · 0.80
RenameFunction · 0.80

Calls 4

DeleteKeyMethod · 0.80
IsDirMethod · 0.65
GetNameMethod · 0.65
PopMethod · 0.45

Tested by

no test coverage detected