(ctx context.Context, src string, dst string)
| 215 | } |
| 216 | |
| 217 | func (d *S3) copyFile(ctx context.Context, src string, dst string) error { |
| 218 | srcKey := getKey(src, false) |
| 219 | dstKey := getKey(dst, false) |
| 220 | encodedKey := strings.ReplaceAll(url.PathEscape(d.Bucket+"/"+srcKey), "+", "%2B") |
| 221 | input := &s3.CopyObjectInput{ |
| 222 | Bucket: &d.Bucket, |
| 223 | CopySource: aws.String(encodedKey), |
| 224 | Key: &dstKey, |
| 225 | } |
| 226 | _, err := d.client.CopyObject(input) |
| 227 | return err |
| 228 | } |
| 229 | |
| 230 | func (d *S3) copyDir(ctx context.Context, src string, dst string) error { |
| 231 | objs, err := op.List(ctx, d, src, model.ListArgs{S3ShowPlaceholder: true}) |
no test coverage detected