MCPcopy
hub / github.com/rclone/rclone / UnWrapObject

Function UnWrapObject

fs/features.go:842–855  ·  view source on GitHub ↗

UnWrapObject unwraps o as much as possible and returns the base object

(o Object)

Source from the content-addressed store, hash-verified

840
841// UnWrapObject unwraps o as much as possible and returns the base object
842func UnWrapObject(o Object) Object {
843 for {
844 u, ok := o.(ObjectUnWrapper)
845 if !ok {
846 break // not a wrapped object, use current
847 }
848 next := u.UnWrap()
849 if next == nil {
850 break // no base object found, use current
851 }
852 o = next
853 }
854 return o
855}
856
857// UnWrapObjectInfo returns the underlying Object unwrapped as much as
858// possible or nil.

Callers 3

unWrapObjectInfoFunction · 0.92
entryMethod · 0.92
UnWrapObjectInfoFunction · 0.85

Calls 1

UnWrapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…