func isTip(b *blob.Blob) bool { objref := b.ObjectRef() tip, err := cl.ObjectTip(objref) if err != nil { return false } return b.Ref() == tip.Ref() }
func (db *Dbase) writeBlob(b *blob.Blob) (err error) { ref := b.Ref() p := path.Join(db.location, ref) f, err := os.Create(p) if err != nil { return err } defer f.Close() _, err = f.Write(b.Content()) return err }
func (o *object) Add(b *blob.Blob) { o.versions = append(o.versions, b.Ref()) t, err := b.Timestamp() util.Check(err) o.tms = append(o.tms, t) }