MCPcopy
hub / github.com/OpenListTeam/OpenList / DeleteDirectoryTree

Method DeleteDirectoryTree

internal/op/cache.go:40–45  ·  view source on GitHub ↗

recursively delete directory and its children from dirCache

(storage driver.Driver, dirPath string)

Source from the content-addressed store, hash-verified

38
39// recursively delete directory and its children from dirCache
40func (cm *CacheManager) DeleteDirectoryTree(storage driver.Driver, dirPath string) {
41 if storage.Config().NoCache {
42 return
43 }
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 {

Callers 2

UpdateStorageFunction · 0.80
DeleteStorageByIdFunction · 0.80

Calls 3

deleteDirectoryTreeMethod · 0.95
KeyFunction · 0.85
ConfigMethod · 0.65

Tested by

no test coverage detected