MCPcopy Index your code
hub / github.com/plexdrive/plexdrive / UpdateObject

Method UpdateObject

drive/cache.go:225–236  ·  view source on GitHub ↗

UpdateObject updates an object

(object *APIObject)

Source from the content-addressed store, hash-verified

223
224// UpdateObject updates an object
225func (c *Cache) UpdateObject(object *APIObject) error {
226 err := c.db.Update(func(tx *bolt.Tx) error {
227 return boltUpdateObject(tx, object)
228 })
229
230 if nil != err {
231 Log.Debugf("%v", err)
232 return fmt.Errorf("Could not update/save object %v (%v)", object.ObjectID, object.Name)
233 }
234
235 return nil
236}
237
238func boltStoreObject(tx *bolt.Tx, object *APIObject) error {
239 b := tx.Bucket(bObjects)

Callers 4

GetRootMethod · 0.80
RemoveMethod · 0.80
MkdirMethod · 0.80
RenameMethod · 0.80

Calls 1

boltUpdateObjectFunction · 0.85

Tested by

no test coverage detected