mirror of
https://github.com/rclone/rclone.git
synced 2025-06-05 03:34:35 +08:00
fs: add Optional ID() method to Object and implement it in backends
ID() shows the internal ID of the Object if available.
This commit is contained in:
@ -1086,6 +1086,11 @@ func (o *Object) readMetaData() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ID returns the ID of the Object if known, or "" if not
|
||||
func (o *Object) ID() string {
|
||||
return o.id
|
||||
}
|
||||
|
||||
// Check the interfaces are satisfied
|
||||
var (
|
||||
_ fs.Fs = (*Fs)(nil)
|
||||
@ -1095,4 +1100,5 @@ var (
|
||||
_ fs.DirMover = (*Fs)(nil)
|
||||
_ fs.DirCacheFlusher = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.IDer = (*Object)(nil)
|
||||
)
|
||||
|
Reference in New Issue
Block a user