MCPcopy Index your code
hub / github.com/rclone/rclone / Hash

Method Hash

backend/oracleobjectstorage/object.go:255–267  ·  view source on GitHub ↗

Hash returns the MD5 of an object returning a lowercase hex string

(ctx context.Context, t hash.Type)

Source from the content-addressed store, hash-verified

253
254// Hash returns the MD5 of an object returning a lowercase hex string
255func (o *Object) Hash(ctx context.Context, t hash.Type) (string, error) {
256 if t != hash.MD5 {
257 return "", hash.ErrUnsupported
258 }
259 // Convert base64 encoded md5 into lower case hex
260 if o.md5 == "" {
261 err := o.readMetaData(ctx)
262 if err != nil {
263 return "", err
264 }
265 }
266 return o.md5, nil
267}
268
269// ModTime returns the modification time of the object
270//

Callers

nothing calls this directly

Calls 1

readMetaDataMethod · 0.95

Tested by

no test coverage detected