// Return an Object from a path
//
//If it can't be found it returns the error ErrorObjectNotFound.
Return an Object from a path

If it can't be found it returns the error ErrorObjectNotFound.
// Return an Object from a path // // If it can ' t be found it returns the error ErrorObjectNotFound .
func (f *Fs) newObjectWithInfo(remote string, info *s3.Object) (fs.Object, error) {
	o := &Object{
		fs:     f,
		remote: remote,
	}
	if info != nil {
		if info.LastModified == nil {
			fs.Logf(o, "Failed to read last modified")
			o.lastModified = time.Now()
		} else {
			o.lastModified = *info.LastModified
		}
		o.etag = aws.StringValue(info.ETag)
		o.bytes = aws.Int64Value(info.Size)
	} else {
		err := o.readMetaData() 
		if err != nil {
			return nil, err
		}
	}
	return o, nil
}
func ( f * Fs ) newObjectWithInfo ( remote string , info * s3 . Object ) ( fs . Object , error ) { o := & Object { fs : f , remote : remote , } if info != nil { if info . LastModified == nil { fs . Logf ( o , " " ) o . lastModified = time . Now ( ) } else { o . lastModified = * info . LastModified } o . etag = aws . StringValue ( info . ETag ) o . bytes = aws . Int64Value ( info . Size ) } else { err := o . readMetaData ( ) if err != nil { return nil , err } } return o , nil }
Return an Object from a path
Return an Object from a path
// Set info but not meta // reads info and meta, returning an error