Factor Fs.Put into Object.Update and call Update rather than Put if possible

This commit is contained in:
Nick Craig-Wood 2014-04-18 17:04:21 +01:00
parent d6a5bfe2d4
commit 02afcb00e9
6 changed files with 135 additions and 101 deletions

View file

@ -103,6 +103,9 @@ type Object interface {
// Open opens the file for read. Call Close() on the returned io.ReadCloser
Open() (io.ReadCloser, error)
// Update in to the object with the modTime given of the given size
Update(in io.Reader, modTime time.Time, size int64) error
// Storable says whether this object can be stored
Storable() bool