tests done

This commit is contained in:
2021-12-28 02:50:54 -05:00
parent 07c38ce23e
commit 330548689a
19 changed files with 677 additions and 27 deletions

View File

@@ -51,6 +51,28 @@ func (b *Blob) Delete() (err error) {
return
}
// Exists returns true if this Blob actually exists.
func (b *Blob) Exists() (exists bool, err error) {
if exists, err = b.folder.HasEntry(b.Name); err != nil {
return
}
return
}
// Rename renames this Blob (changes its key).
func (b *Blob) Rename(newName string) (err error) {
if err = b.folder.RenameEntry(b.Name, newName); err != nil {
return
}
b.Name = newName
return
}
// SetValue will replace this Blob's Blob.Value.
func (b *Blob) SetValue(newValue []byte) (err error) {
@@ -69,6 +91,10 @@ func (b *Blob) Update() (err error) {
var call *dbus.Call
var v dbus.Variant
if err = b.folder.wallet.walletCheck(); err != nil {
return
}
if call = b.Dbus.Call(
DbusWMReadEntry, 0, b.folder.wallet.handle, b.folder.Name, b.Name, b.folder.wallet.wm.AppID,
); call.Err != nil {