mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
fs: implement optional Metadata interface for Objects #111
This implements integration tests for the feature also.
This commit is contained in:
@@ -352,6 +352,16 @@ func (o *OverrideRemote) GetTier() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Metadata returns metadata for an object
|
||||
//
|
||||
// It should return nil if there is no Metadata
|
||||
func (o *OverrideRemote) Metadata(ctx context.Context) (fs.Metadata, error) {
|
||||
if do, ok := o.ObjectInfo.(fs.Metadataer); ok {
|
||||
return do.Metadata(ctx)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Check all optional interfaces satisfied
|
||||
var _ fs.FullObjectInfo = (*OverrideRemote)(nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user