Skip to content

Commit

Permalink
[Storage][DataMovement] Rename DataTransfer* to Transfer* (Azure#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jalauzon-msft authored Jan 9, 2025
1 parent 8f17a51 commit 6d25121
Show file tree
Hide file tree
Showing 158 changed files with 1,979 additions and 1,986 deletions.
16 changes: 8 additions & 8 deletions sdk/storage/Azure.Storage.Blobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,14 @@ For more advanced scenarios like transferring blob virtual directories, we recom

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

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```
Expand All @@ -214,27 +214,27 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
{
BlobDirectoryPrefix = blobDirectoryPrefix
},
TransferOptions = new DataTransferOptions()
TransferOptions = new TransferOptions()
{
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
}
};

DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, options);
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, options);

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```
Expand All @@ -247,13 +247,13 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
{
BlobDirectoryPrefix = blobDirectoryPrefix
},
TransferOptions = new DataTransferOptions()
TransferOptions = new TransferOptions()
{
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
}
};

DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);

await transfer.WaitForCompletionAsync();
```
Expand Down
38 changes: 19 additions & 19 deletions sdk/storage/Azure.Storage.DataMovement.Blobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ An upload takes place between a local file `StorageResource` as source and blob
Upload a block blob.

```C# Snippet:SimpleBlobUpload
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
TransferOperation transferOperation = await transferManager.StartTransferAsync(
sourceResource: files.FromFile(sourceLocalPath),
destinationResource: blobs.FromBlob(destinationBlobUri));
await dataTransfer.WaitForCompletionAsync();
await transferOperation.WaitForCompletionAsync();
```

Upload a directory as a specific blob type.

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

```C# Snippet:SimpleBlockBlobDownload
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
TransferOperation transferOperation = await transferManager.StartTransferAsync(
sourceResource: blobs.FromBlob(sourceBlobUri),
destinationResource: files.FromFile(downloadPath));
await dataTransfer.WaitForCompletionAsync();
await transferOperation.WaitForCompletionAsync();
```

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

```C# Snippet:SimpleDirectoryDownload_Blob
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
TransferOperation transferOperation = await transferManager.StartTransferAsync(
sourceResource: blobs.FromContainer(
blobContainerUri,
new BlobStorageResourceContainerOptions()
{
BlobDirectoryPrefix = optionalSourcePrefix
}),
destinationResource: files.FromDirectory(downloadPath));
await dataTransfer.WaitForCompletionAsync();
await transferOperation.WaitForCompletionAsync();
```

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

```C# Snippet:s2sCopyBlob
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
TransferOperation transferOperation = await transferManager.StartTransferAsync(
sourceResource: blobs.FromBlob(sourceBlobUri),
destinationResource: blobs.FromBlob(destinationBlobUri, new AppendBlobStorageResourceOptions()));
await dataTransfer.WaitForCompletionAsync();
await transferOperation.WaitForCompletionAsync();
```

Copy a blob container.

```C# Snippet:s2sCopyBlobContainer
DataTransfer dataTransfer = await transferManager.StartTransferAsync(
TransferOperation transferOperation = await transferManager.StartTransferAsync(
sourceResource: blobs.FromContainer(
sourceContainerUri,
new BlobStorageResourceContainerOptions()
Expand All @@ -223,7 +223,7 @@ destinationResource: blobs.FromContainer(
BlobType = new(BlobType.Block),
BlobDirectoryPrefix = downloadPath
}));
await dataTransfer.WaitForCompletionAsync();
await transferOperation.WaitForCompletionAsync();
```

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

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

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```
Expand All @@ -259,27 +259,27 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
{
BlobDirectoryPrefix = blobDirectoryPrefix
},
TransferOptions = new DataTransferOptions()
TransferOptions = new TransferOptions()
{
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
}
};

DataTransfer transfer = await container.StartUploadDirectoryAsync(localPath, options);
TransferOperation transfer = await container.StartUploadDirectoryAsync(localPath, options);

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```

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

await transfer.WaitForCompletionAsync();
```
Expand All @@ -292,13 +292,13 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
{
BlobDirectoryPrefix = blobDirectoryPrefix
},
TransferOptions = new DataTransferOptions()
TransferOptions = new TransferOptions()
{
CreationPreference = StorageResourceCreationPreference.OverwriteIfExists,
}
};

DataTransfer transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);
TransferOperation transfer = await container.StartDownloadToDirectoryAsync(localDirectoryPath2, options);

await transfer.WaitForCompletionAsync();
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace Azure.Storage.Blobs
{
public static partial class BlobContainerClientExtensions
{
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
}
}
namespace Azure.Storage.DataMovement.Blobs
Expand All @@ -20,7 +20,7 @@ public partial class BlobContainerClientTransferOptions
{
public BlobContainerClientTransferOptions() { }
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions BlobContainerOptions { get { throw null; } set { } }
public Azure.Storage.DataMovement.DataTransferOptions TransferOptions { get { throw null; } set { } }
public Azure.Storage.DataMovement.TransferOptions TransferOptions { get { throw null; } set { } }
}
public partial class BlobsStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider
{
Expand All @@ -38,8 +38,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.BlockBlobClient client, Azure.Storage.DataMovement.Blobs.BlockBlobStorageResourceOptions options = null) { throw null; }
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.PageBlobClient client, Azure.Storage.DataMovement.Blobs.PageBlobStorageResourceOptions options = null) { throw null; }
public Azure.Storage.DataMovement.StorageResource FromContainer(System.Uri containerUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
public delegate Azure.AzureSasCredential GetAzureSasCredential(System.Uri uri, bool readOnly);
public delegate Azure.Storage.StorageSharedKeyCredential GetStorageSharedKeyCredential(System.Uri uri, bool readOnly);
public delegate Azure.Core.TokenCredential GetTokenCredential(System.Uri uri, bool readOnly);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace Azure.Storage.Blobs
{
public static partial class BlobContainerClientExtensions
{
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.DataTransfer> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartDownloadToDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
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; }
public static System.Threading.Tasks.Task<Azure.Storage.DataMovement.TransferOperation> StartUploadDirectoryAsync(this Azure.Storage.Blobs.BlobContainerClient client, string localDirectoryPath, string blobDirectoryPrefix = null) { throw null; }
}
}
namespace Azure.Storage.DataMovement.Blobs
Expand All @@ -20,7 +20,7 @@ public partial class BlobContainerClientTransferOptions
{
public BlobContainerClientTransferOptions() { }
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions BlobContainerOptions { get { throw null; } set { } }
public Azure.Storage.DataMovement.DataTransferOptions TransferOptions { get { throw null; } set { } }
public Azure.Storage.DataMovement.TransferOptions TransferOptions { get { throw null; } set { } }
}
public partial class BlobsStorageResourceProvider : Azure.Storage.DataMovement.StorageResourceProvider
{
Expand All @@ -38,8 +38,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.BlockBlobClient client, Azure.Storage.DataMovement.Blobs.BlockBlobStorageResourceOptions options = null) { throw null; }
public Azure.Storage.DataMovement.StorageResource FromClient(Azure.Storage.Blobs.Specialized.PageBlobClient client, Azure.Storage.DataMovement.Blobs.PageBlobStorageResourceOptions options = null) { throw null; }
public Azure.Storage.DataMovement.StorageResource FromContainer(System.Uri containerUri, Azure.Storage.DataMovement.Blobs.BlobStorageResourceContainerOptions options = null) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.DataTransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromDestinationAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
protected override System.Threading.Tasks.Task<Azure.Storage.DataMovement.StorageResource> FromSourceAsync(Azure.Storage.DataMovement.TransferProperties properties, System.Threading.CancellationToken cancellationToken) { throw null; }
public delegate Azure.AzureSasCredential GetAzureSasCredential(System.Uri uri, bool readOnly);
public delegate Azure.Storage.StorageSharedKeyCredential GetStorageSharedKeyCredential(System.Uri uri, bool readOnly);
public delegate Azure.Core.TokenCredential GetTokenCredential(System.Uri uri, bool readOnly);
Expand Down
Loading

0 comments on commit 6d25121

Please sign in to comment.