MCPcopy Create free account
hub / github.com/rclone/rclone / removeObjectData

Method removeObjectData

backend/memory/memory.go:141–153  ·  view source on GitHub ↗

removeObjectData removes an object from (bucketName, bucketPath) returning true if removed

(bucketName, bucketPath string)

Source from the content-addressed store, hash-verified

139
140// removeObjectData removes an object from (bucketName, bucketPath) returning true if removed
141func (bi *bucketsInfo) removeObjectData(bucketName, bucketPath string) (removed bool) {
142 b := bi.getBucket(bucketName)
143 if b != nil {
144 b.mu.Lock()
145 od := b.objects[bucketPath]
146 if od != nil {
147 delete(b.objects, bucketPath)
148 removed = true
149 }
150 b.mu.Unlock()
151 }
152 return removed
153}
154
155// bucketInfo holds info about a single bucket
156type bucketInfo struct {

Callers 1

RemoveMethod · 0.80

Calls 3

getBucketMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected