MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / deleteRecursive

Method deleteRecursive

cmd/data-usage-cache.go:484–492  ·  view source on GitHub ↗

deleteRecursive will delete an entry recursively, but not change its parent.

(h dataUsageHash)

Source from the content-addressed store, hash-verified

482
483// deleteRecursive will delete an entry recursively, but not change its parent.
484func (d *dataUsageCache) deleteRecursive(h dataUsageHash) {
485 if existing, ok := d.Cache[h.String()]; ok {
486 // Delete first if there should be a loop.
487 delete(d.Cache, h.Key())
488 for child := range existing.Children {
489 d.deleteRecursive(dataUsageHash(child))
490 }
491 }
492}
493
494// dui converts the flattened version of the path to madmin.DataUsageInfo.
495// As a side effect d will be flattened, use a clone if this is not ok.

Callers 2

reduceChildrenOfMethod · 0.95
scanFolderMethod · 0.80

Calls 3

dataUsageHashTypeAlias · 0.85
StringMethod · 0.65
KeyMethod · 0.45

Tested by

no test coverage detected