fs: Implement UnWrapObjectInfo for getting original object out of src objects

This commit is contained in:
Nick Craig-Wood 2020-09-17 11:46:32 +01:00
parent fc5b14b620
commit 51a230d7fd

View File

@ -1143,6 +1143,16 @@ func UnWrapObject(o Object) Object {
return o return o
} }
// UnWrapObjectInfo returns the underlying Object unwrapped as much as
// possible or nil.
func UnWrapObjectInfo(oi ObjectInfo) Object {
o, ok := oi.(Object)
if !ok {
return nil
}
return UnWrapObject(o)
}
// Find looks for a RegInfo object for the name passed in. The name // Find looks for a RegInfo object for the name passed in. The name
// can be either the Name or the Prefix. // can be either the Name or the Prefix.
// //