checking in, tests left

This commit is contained in:
2021-12-23 04:21:21 -05:00
parent 25f9c3c1c9
commit 6c64681bc8
8 changed files with 206 additions and 75 deletions

View File

@@ -38,6 +38,30 @@ func NewBlob(f *Folder, keyName string, recursion *RecurseOpts) (blob *Blob, err
return
}
// Delete will delete this Blob from its parent Folder. You may want to run Folder.UpdateBlobs to update the existing map of Blob items.
func (b *Blob) Delete() (err error) {
if err = b.folder.RemoveEntry(b.Name); err != nil {
return
}
b = nil
return
}
// SetValue will replace this Blob's Blob.Value.
func (b *Blob) SetValue(newValue []byte) (err error) {
if _, err = b.folder.WriteBlob(b.Name, newValue); err != nil {
return
}
b.Value = newValue
return
}
// Update fetches a Blob's Blob.Value.
func (b *Blob) Update() (err error) {