MCPcopy
hub / github.com/rclone/rclone / readMetaData

Method readMetaData

backend/s3/s3.go:4016–4027  ·  view source on GitHub ↗

readMetaData gets the metadata if it hasn't already been fetched it also sets the info

(ctx context.Context)

Source from the content-addressed store, hash-verified

4014//
4015// it also sets the info
4016func (o *Object) readMetaData(ctx context.Context) (err error) {
4017 if o.meta != nil {
4018 return nil
4019 }
4020 resp, err := o.headObject(ctx)
4021 if err != nil {
4022 return err
4023 }
4024 o.setMetaData(resp)
4025 // resp.ETag, resp.ContentLength, resp.LastModified, resp.Metadata, resp.ContentType, resp.StorageClass)
4026 return nil
4027}
4028
4029// Convert S3 metadata into a map[string]string while lowercasing the
4030// keys

Callers 6

newObjectWithInfoMethod · 0.95
HashMethod · 0.95
ModTimeMethod · 0.95
SetModTimeMethod · 0.95
MimeTypeMethod · 0.95
MetadataMethod · 0.95

Calls 2

headObjectMethod · 0.95
setMetaDataMethod · 0.95

Tested by

no test coverage detected