SetModTime sets the ModTime of this object
(ctx context.Context, t time.Time)
| 198 | |
| 199 | // SetModTime sets the ModTime of this object |
| 200 | func (o *Object) SetModTime(ctx context.Context, t time.Time) error { |
| 201 | if err := o.refreshFromSource(ctx, false); err != nil { |
| 202 | return err |
| 203 | } |
| 204 | |
| 205 | err := o.Object.SetModTime(ctx, t) |
| 206 | if err != nil { |
| 207 | return err |
| 208 | } |
| 209 | |
| 210 | o.CacheModTime = t.UnixNano() |
| 211 | o.persist() |
| 212 | fs.Debugf(o, "updated ModTime: %v", t) |
| 213 | |
| 214 | return nil |
| 215 | } |
| 216 | |
| 217 | // Open is used to request a specific part of the file using fs.RangeOption |
| 218 | func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (io.ReadCloser, error) { |