mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:36:38 +08:00
fs: Implement UnWrapObjectInfo for getting original object out of src objects
This commit is contained in:
parent
fc5b14b620
commit
51a230d7fd
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.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue
Block a user