Skip to content

Commit 6d25121

Browse files
[Storage][DataMovement] Rename DataTransfer* to Transfer* (Azure#47754)
1 parent 8f17a51 commit 6d25121

File tree

158 files changed

+1979
-1986
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+1979
-1986
lines changed

sdk/storage/Azure.Storage.Blobs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ For more advanced scenarios like transferring blob virtual directories, we recom
194194

195195
Upload a local directory to the root of the `BlobContainerClient`.
196196
```C# Snippet:ExtensionMethodSimpleUploadToRoot
197-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath);
197+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath);
198198

199199
await transfer.WaitForCompletionAsync();
200200
```
201201

202202
Upload a local directory to a virtual blob directory in the `BlobContainerClient` by specifying a directory prefix
203203
```C# Snippet:ExtensionMethodSimpleUploadToDirectoryPrefix
204-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, blobDirectoryPrefix);
204+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, blobDirectoryPrefix);
205205

206206
await transfer.WaitForCompletionAsync();
207207
```
@@ -214,27 +214,27 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
214214
{
215215
BlobDirectoryPrefix = blobDirectoryPrefix
216216
},
217-
TransferOptions = new DataTransferOptions()
217+
TransferOptions = new TransferOptions()
218218
{
219219
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
220220
}
221221
};
222222

223-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, options);
223+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, options);
224224

225225
await transfer.WaitForCompletionAsync();
226226
```
227227

228228
Download the entire `BlobContainerClient` to a local directory
229229
```C# Snippet:ExtensionMethodSimpleDownloadContainer
230-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath);
230+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath);
231231

232232
await transfer.WaitForCompletionAsync();
233233
```
234234

235235
Download a virtual blob directory in the `BlobContainerClient` by specifying a directory prefix
236236
```C# Snippet:ExtensionMethodSimpleDownloadContainerDirectory
237-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, blobDirectoryPrefix);
237+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, blobDirectoryPrefix);
238238

239239
await transfer.WaitForCompletionAsync();
240240
```
@@ -247,13 +247,13 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
247247
{
248248
BlobDirectoryPrefix = blobDirectoryPrefix
249249
},
250-
TransferOptions = new DataTransferOptions()
250+
TransferOptions = new TransferOptions()
251251
{
252252
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
253253
}
254254
};
255255

256-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
256+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
257257

258258
await transfer.WaitForCompletionAsync();
259259
```

sdk/storage/Azure.Storage.DataMovement.Blobs/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,16 @@ An upload takes place between a local file `StorageResource` as source and blob
143143
Upload a block blob.
144144

145145
```C# Snippet:SimpleBlobUpload
146-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
146+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
147147
sourceResource: files.FromFile(sourceLocalPath),
148148
destinationResource: blobs.FromBlob(destinationBlobUri));
149-
await dataTransfer.WaitForCompletionAsync();
149+
await transferOperation.WaitForCompletionAsync();
150150
```
151151

152152
Upload a directory as a specific blob type.
153153

154154
```C# Snippet:SimpleDirectoryUpload
155-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
155+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
156156
sourceResource: files.FromDirectory(sourcePath),
157157
destinationResource: blobs.FromContainer(
158158
blobContainerUri,
@@ -171,24 +171,24 @@ A download takes place between a blob `StorageResource` as source and local file
171171
Download a blob.
172172

173173
```C# Snippet:SimpleBlockBlobDownload
174-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
174+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
175175
sourceResource: blobs.FromBlob(sourceBlobUri),
176176
destinationResource: files.FromFile(downloadPath));
177-
await dataTransfer.WaitForCompletionAsync();
177+
await transferOperation.WaitForCompletionAsync();
178178
```
179179

180180
Download a container which may contain a mix of blob types.
181181

182182
```C# Snippet:SimpleDirectoryDownload_Blob
183-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
183+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
184184
sourceResource: blobs.FromContainer(
185185
blobContainerUri,
186186
new BlobStorageResourceContainerOptions()
187187
{
188188
BlobDirectoryPrefix = optionalSourcePrefix
189189
}),
190190
destinationResource: files.FromDirectory(downloadPath));
191-
await dataTransfer.WaitForCompletionAsync();
191+
await transferOperation.WaitForCompletionAsync();
192192
```
193193

194194
### Blob Copy
@@ -198,16 +198,16 @@ A copy takes place between two blob `StorageResource` instances. Copying between
198198
Copy a single blob. Note the destination blob is an append blob, regardless of the first blob's type.
199199

200200
```C# Snippet:s2sCopyBlob
201-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
201+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
202202
sourceResource: blobs.FromBlob(sourceBlobUri),
203203
destinationResource: blobs.FromBlob(destinationBlobUri, new AppendBlobStorageResourceOptions()));
204-
await dataTransfer.WaitForCompletionAsync();
204+
await transferOperation.WaitForCompletionAsync();
205205
```
206206

207207
Copy a blob container.
208208

209209
```C# Snippet:s2sCopyBlobContainer
210-
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
210+
TransferOperation transferOperation = await transferManager.StartTransferAsync(
211211
sourceResource: blobs.FromContainer(
212212
sourceContainerUri,
213213
new BlobStorageResourceContainerOptions()
@@ -223,7 +223,7 @@ destinationResource: blobs.FromContainer(
223223
BlobType = new(BlobType.Block),
224224
BlobDirectoryPrefix = downloadPath
225225
}));
226-
await dataTransfer.WaitForCompletionAsync();
226+
await transferOperation.WaitForCompletionAsync();
227227
```
228228

229229
### Extensions on `BlobContainerClient`
@@ -239,14 +239,14 @@ BlobContainerClient container = service.GetBlobContainerClient(containerName);
239239

240240
Upload a local directory to the root of the container
241241
```C# Snippet:ExtensionMethodSimpleUploadToRoot
242-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath);
242+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath);
243243

244244
await transfer.WaitForCompletionAsync();
245245
```
246246

247247
Upload a local directory to a virtual directory in the container by specifying a directory prefix
248248
```C# Snippet:ExtensionMethodSimpleUploadToDirectoryPrefix
249-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, blobDirectoryPrefix);
249+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, blobDirectoryPrefix);
250250

251251
await transfer.WaitForCompletionAsync();
252252
```
@@ -259,27 +259,27 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
259259
{
260260
BlobDirectoryPrefix = blobDirectoryPrefix
261261
},
262-
TransferOptions = new DataTransferOptions()
262+
TransferOptions = new TransferOptions()
263263
{
264264
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
265265
}
266266
};
267267

268-
DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, options);
268+
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, options);
269269

270270
await transfer.WaitForCompletionAsync();
271271
```
272272

273273
Download the entire container to a local directory
274274
```C# Snippet:ExtensionMethodSimpleDownloadContainer
275-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath);
275+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath);
276276

277277
await transfer.WaitForCompletionAsync();
278278
```
279279

280280
Download a directory in the container by specifying a directory prefix
281281
```C# Snippet:ExtensionMethodSimpleDownloadContainerDirectory
282-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, blobDirectoryPrefix);
282+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, blobDirectoryPrefix);
283283

284284
await transfer.WaitForCompletionAsync();
285285
```
@@ -292,13 +292,13 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
292292
{
293293
BlobDirectoryPrefix = blobDirectoryPrefix
294294
},
295-
TransferOptions = new DataTransferOptions()
295+
TransferOptions = new TransferOptions()
296296
{
297297
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
298298
}
299299
};
300300

301-
DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
301+
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
302302

303303
await transfer.WaitForCompletionAsync();
304304
```

sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net6.0.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ namespace Azure.Storage.Blobs
22
{
33
public static partial class BlobContainerClientExtensions
44
{
5-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
6-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
7-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
8-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
5+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
6+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
7+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
8+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
99
}
1010
}
1111
namespace Azure.Storage.DataMovement.Blobs
@@ -20,7 +20,7 @@ public partial class BlobContainerClientTransferOptions
2020
{
2121
public BlobContainerClientTransferOptions() { }
2222
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions BlobContainerOptions { get { throw null; } set { } }
23-
public Azure.Storage.DataMovement.DataTransferOptions TransferOptions { get { throw null; } set { } }
23+
public Azure.Storage.DataMovement.TransferOptions TransferOptions { get { throw null; } set { } }
2424
}
2525
public partial class BlobsStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider
2626
{
@@ -38,8 +38,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
3838
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.BlockBlobClient client, Azure.Storage.DataMovement.Blobs.BlockBlobStorageResourceOptions options = null) { throw null; }
3939
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.PageBlobClient client, Azure.Storage.DataMovement.Blobs.PageBlobStorageResourceOptions options = null) { throw null; }
4040
public Azure.Storage.DataMovement.StorageResource FromContainer(System.Uri containerUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; }
41-
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
42-
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
41+
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
42+
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
4343
public delegate Azure.AzureSasCredential GetAzureSasCredential(System.Uri uri, bool readOnly);
4444
public delegate Azure.Storage.StorageSharedKeyCredential GetStorageSharedKeyCredential(System.Uri uri, bool readOnly);
4545
public delegate Azure.Core.TokenCredential GetTokenCredential(System.Uri uri, bool readOnly);

sdk/storage/Azure.Storage.DataMovement.Blobs/api/Azure.Storage.DataMovement.Blobs.net8.0.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ namespace Azure.Storage.Blobs
22
{
33
public static partial class BlobContainerClientExtensions
44
{
5-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
6-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
7-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
8-
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
5+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
6+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
7+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, Azure.Storage.DataMovement.Blobs.BlobContainerClientTransferOptions options) { throw null; }
8+
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
99
}
1010
}
1111
namespace Azure.Storage.DataMovement.Blobs
@@ -20,7 +20,7 @@ public partial class BlobContainerClientTransferOptions
2020
{
2121
public BlobContainerClientTransferOptions() { }
2222
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions BlobContainerOptions { get { throw null; } set { } }
23-
public Azure.Storage.DataMovement.DataTransferOptions TransferOptions { get { throw null; } set { } }
23+
public Azure.Storage.DataMovement.TransferOptions TransferOptions { get { throw null; } set { } }
2424
}
2525
public partial class BlobsStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider
2626
{
@@ -38,8 +38,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
3838
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.BlockBlobClient client, Azure.Storage.DataMovement.Blobs.BlockBlobStorageResourceOptions options = null) { throw null; }
3939
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.PageBlobClient client, Azure.Storage.DataMovement.Blobs.PageBlobStorageResourceOptions options = null) { throw null; }
4040
public Azure.Storage.DataMovement.StorageResource FromContainer(System.Uri containerUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; }
41-
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
42-
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
41+
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
42+
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
4343
public delegate Azure.AzureSasCredential GetAzureSasCredential(System.Uri uri, bool readOnly);
4444
public delegate Azure.Storage.StorageSharedKeyCredential GetStorageSharedKeyCredential(System.Uri uri, bool readOnly);
4545
public delegate Azure.Core.TokenCredential GetTokenCredential(System.Uri uri, bool readOnly);

0 commit comments

Comments
 (0)