ExpireObject will flush an Object and all its data if desired
(co *Object, withData bool)
| 427 | |
| 428 | // ExpireObject will flush an Object and all its data if desired |
| 429 | func (b *Persistent) ExpireObject(co *Object, withData bool) error { |
| 430 | co.CacheTs = time.Now().Add(time.Duration(-co.CacheFs.opt.InfoAge)) |
| 431 | err := b.AddObject(co) |
| 432 | if withData { |
| 433 | _ = os.RemoveAll(path.Join(b.dataPath, co.abs())) |
| 434 | } |
| 435 | return err |
| 436 | } |
| 437 | |
| 438 | // HasEntry confirms the existence of a single entry (dir or object) |
| 439 | func (b *Persistent) HasEntry(remote string) bool { |