MCPcopy
hub / github.com/scality/cloudserver / copyObject

Function copyObject

tests/sur/quota.js:127–140  ·  view source on GitHub ↗
(bucket, key, sourceSize, cb)

Source from the content-addressed store, hash-verified

125}
126
127function copyObject(bucket, key, sourceSize, cb) {
128 return s3Client.send(new CopyObjectCommand({
129 Bucket: bucket,
130 CopySource: `${bucket}/${key}`,
131 Key: `${key}-copy`,
132 }))
133 .then(data => {
134 if (!s3Config.isQuotaInflightEnabled()) {
135 mockScuba.incrementBytesForBucket(bucket, sourceSize);
136 }
137 return cb(null, data);
138 })
139 .catch(cb);
140}
141
142function deleteObject(bucket, key, size, cb) {
143 return s3Client.send(new DeleteObjectCommand({

Callers 1

quota.jsFile · 0.70

Calls 3

sendMethod · 0.80

Tested by

no test coverage detected