Copy src to this remote using server-side copy operations. This is stored with the remote path given. It returns the destination Object and a possible error. Will only be called if src.Fs().Name() == f.Name() If it isn't possible then return fs.ErrorCantCopy
(ctx context.Context, src fs.Object, remote string)
| 650 | // |
| 651 | // If it isn't possible then return fs.ErrorCantCopy |
| 652 | func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error) { |
| 653 | do := f.Fs.Features().Copy |
| 654 | if do == nil { |
| 655 | return nil, fs.ErrorCantCopy |
| 656 | } |
| 657 | o, ok := src.(*Object) |
| 658 | if !ok { |
| 659 | return nil, fs.ErrorCantCopy |
| 660 | } |
| 661 | oResult, err := do(ctx, o.Object, f.cipher.EncryptFileName(remote)) |
| 662 | if err != nil { |
| 663 | return nil, err |
| 664 | } |
| 665 | return f.newObject(oResult), nil |
| 666 | } |
| 667 | |
| 668 | // Move src to this remote using server-side move operations. |
| 669 | // |
nothing calls this directly
no test coverage detected