SetModTime sets the modification time of the local fs object
(ctx context.Context, modTime time.Time)
| 1439 | |
| 1440 | // SetModTime sets the modification time of the local fs object |
| 1441 | func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { |
| 1442 | err := o.readMetaData(ctx) |
| 1443 | if err != nil { |
| 1444 | return err |
| 1445 | } |
| 1446 | meta := o.headers.ObjectMetadata() |
| 1447 | meta.SetModTime(modTime) |
| 1448 | newHeaders := meta.ObjectHeaders() |
| 1449 | maps.Copy(o.headers, newHeaders) |
| 1450 | // Include any other metadata from request |
| 1451 | for k, v := range o.headers { |
| 1452 | if strings.HasPrefix(k, "X-Object-") { |
| 1453 | newHeaders[k] = v |
| 1454 | } |
| 1455 | } |
| 1456 | container, containerPath := o.split() |
| 1457 | return o.fs.pacer.Call(func() (bool, error) { |
| 1458 | err = o.fs.c.ObjectUpdate(ctx, container, containerPath, newHeaders) |
| 1459 | return shouldRetry(ctx, err) |
| 1460 | }) |
| 1461 | } |
| 1462 | |
| 1463 | // Storable returns if this object is storable |
| 1464 | // |
nothing calls this directly
no test coverage detected