mirror of
https://github.com/rclone/rclone.git
synced 2025-06-30 20:40:57 +02:00
fs: Implement UnWrapObjectInfo for getting original object out of src objects
This commit is contained in:
10
fs/fs.go
10
fs/fs.go
@ -1143,6 +1143,16 @@ func UnWrapObject(o Object) Object {
|
||||
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
|
||||
// can be either the Name or the Prefix.
|
||||
//
|
||||
|
Reference in New Issue
Block a user