SetModTime sets the modification time of the local fs object
(ctx context.Context, modTime time.Time)
| 770 | |
| 771 | // SetModTime sets the modification time of the local fs object |
| 772 | func (o *Object) SetModTime(ctx context.Context, modTime time.Time) (err error) { |
| 773 | params := files_sdk.FileUpdateParams{ |
| 774 | Path: o.fs.absPath(o.remote), |
| 775 | ProvidedMtime: &modTime, |
| 776 | } |
| 777 | |
| 778 | var file files_sdk.File |
| 779 | err = o.fs.pacer.Call(func() (bool, error) { |
| 780 | file, err = o.fs.fileClient.Update(params, files_sdk.WithContext(ctx)) |
| 781 | return shouldRetry(ctx, err) |
| 782 | }) |
| 783 | if err != nil { |
| 784 | return err |
| 785 | } |
| 786 | return o.setMetaData(&file) |
| 787 | } |
| 788 | |
| 789 | // Storable returns a boolean showing whether this object storable |
| 790 | func (o *Object) Storable() bool { |
no test coverage detected