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

Method RemoveObject

internal/op/cache.go:178–188  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

176}
177
178func (dc *directoryCache) RemoveObject(name string) {
179 dc.mu.Lock()
180 defer dc.mu.Unlock()
181 for i, obj := range dc.objs {
182 if obj.GetName() == name {
183 dc.objs = append(dc.objs[:i], dc.objs[i+1:]...)
184 dc.dirtyFlags |= dirtyRemove
185 break
186 }
187 }
188}
189
190func (dc *directoryCache) UpdateObject(oldName string, newObj model.Obj) {
191 dc.mu.Lock()

Callers 2

removeDirectoryObjectMethod · 0.80
MoveFunction · 0.80

Calls 2

UnlockMethod · 0.65
GetNameMethod · 0.65

Tested by

no test coverage detected