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

it also sets the info
// readMetaData gets the metadata if it hasn ' t already been fetched // // it also sets the info
func (o *Object) readMetaData() (err error) {
	if o.meta != nil {
		return nil
	}
	key := o.fs.root + o.remote
	req := s3.HeadObjectInput{
		Bucket: &o.fs.bucket,
		Key:    &key,
	}
	resp, err := o.fs.c.HeadObject(&req)
	if err != nil {
		if awsErr, ok := err.(awserr.RequestFailure); ok {
			if awsErr.StatusCode() == http.StatusNotFound {
				return fs.ErrorObjectNotFound
			}
		}
		return err
	}
	var size int64
	if resp.ContentLength != nil {
		size = *resp.ContentLength
	}
	o.etag = aws.StringValue(resp.ETag)
	o.bytes = size
	o.meta = resp.Metadata
	if resp.LastModified == nil {
		fs.Logf(o, "Failed to read last modified from HEAD: %v", err)
		o.lastModified = time.Now()
	} else {
		o.lastModified = *resp.LastModified
	}
	o.mimeType = aws.StringValue(resp.ContentType)
	return nil
}
func ( o * Object ) readMetaData ( ) ( err error ) { if o . meta != nil { return nil } key := o . fs . root + o . remote req := s3 . HeadObjectInput { Bucket : & o . fs . bucket , Key : & key , } resp , err := o . fs . c . HeadObject ( & req ) if err != nil { if awsErr , ok := err . ( awserr . RequestFailure ) ; ok { if awsErr . StatusCode ( ) == http . StatusNotFound { return fs . ErrorObjectNotFound } } return err } var size int64 if resp . ContentLength != nil { size = * resp . ContentLength } o . etag = aws . StringValue ( resp . ETag ) o . bytes = size o . meta = resp . Metadata if resp . LastModified == nil { fs . Logf ( o , " " , err ) o . lastModified = time . Now ( ) } else { o . lastModified = * resp . LastModified } o . mimeType = aws . StringValue ( resp . ContentType ) return nil }
readMetaData gets the metadata if it hasn't already been fetched
readMetaData gets the metadata if it hasn ' t already been fetched
// Ignore missing Content-Length assuming it is 0 // Some versions of ceph do this due their apache proxies