Factor Fs.Put into Object.Update and call Update rather than Put if possible
This commit is contained in:
parent
d6a5bfe2d4
commit
02afcb00e9
6 changed files with 135 additions and 101 deletions
3
fs/fs.go
3
fs/fs.go
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue