Skip to content

Commit cf78a97

Browse files
authored
Renamed BlobStorageResourceContainerOptions.BlobDirectoryPrefix to BlobPrefix (Azure#47938)
1 parent ea50779 commit cf78a97

File tree

34 files changed

+75
-74
lines changed

34 files changed

+75
-74
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
212212
{
213213
BlobContainerOptions = new BlobStorageResourceContainerOptions
214214
{
215-
BlobDirectoryPrefix = blobDirectoryPrefix
215+
BlobPrefix = blobDirectoryPrefix
216216
},
217217
TransferOptions = new TransferOptions()
218218
{
@@ -245,7 +245,7 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
245245
{
246246
BlobContainerOptions = new BlobStorageResourceContainerOptions
247247
{
248-
BlobDirectoryPrefix = blobDirectoryPrefix
248+
BlobPrefix = blobDirectoryPrefix
249249
},
250250
TransferOptions = new TransferOptions()
251251
{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- `BlobStorageResourceOptions.ContentEncoding`
1414
- `BlobStorageResourceOptions.ContentDisposition`
1515
- `BlobStorageResourceOptions.CacheControl`
16+
- Renamed `BlobStorageResourceContainerOptions.BlobDirectoryPrefix` to `BlobPrefix`
1617
- Changed `BlobContainerClient.StartUploadDirectoryAsync` to `BlobContainerClient.UploadDirectoryAsync` and added a required `waitUntil` parameter.
1718
- Changed `BlobContainerClient.StartDownloadToDirectoryAsync` to `BlobContainerClient.DownloadToDirectoryAsync` and added a required `waitUntil` parameter.
1819

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ There are more options which can be used when creating a blob storage resource.
125125
```C# Snippet:ResourceConstruction_Blobs_WithOptions_VirtualDirectory
126126
BlobStorageResourceContainerOptions virtualDirectoryOptions = new()
127127
{
128-
BlobDirectoryPrefix = "blob/directory/prefix"
128+
BlobPrefix = "blob/directory/prefix"
129129
};
130130

131131
StorageResource virtualDirectoryResource = blobs.FromClient(
@@ -170,7 +170,7 @@ TransferOperation transferOperation = await transferManager.StartTransferAsync(
170170
{
171171
// Block blobs are the default if not specified
172172
BlobType = BlobType.Block,
173-
BlobDirectoryPrefix = optionalDestinationPrefix,
173+
BlobPrefix = optionalDestinationPrefix,
174174
}));
175175
```
176176

@@ -195,7 +195,7 @@ TransferOperation transferOperation = await transferManager.StartTransferAsync(
195195
blobContainerUri,
196196
new BlobStorageResourceContainerOptions()
197197
{
198-
BlobDirectoryPrefix = optionalSourcePrefix
198+
BlobPrefix = optionalSourcePrefix
199199
}),
200200
destinationResource: files.FromDirectory(downloadPath));
201201
await transferOperation.WaitForCompletionAsync();
@@ -222,7 +222,7 @@ sourceResource: blobs.FromContainer(
222222
sourceContainerUri,
223223
new BlobStorageResourceContainerOptions()
224224
{
225-
BlobDirectoryPrefix = sourceDirectoryName
225+
BlobPrefix = sourceDirectoryName
226226
}),
227227
destinationResource: blobs.FromContainer(
228228
destinationContainerUri,
@@ -231,7 +231,7 @@ destinationResource: blobs.FromContainer(
231231
// all source blobs will be copied as a single type of destination blob
232232
// defaults to block blobs if unspecified
233233
BlobType = BlobType.Block,
234-
BlobDirectoryPrefix = downloadPath
234+
BlobPrefix = downloadPath
235235
}));
236236
await transferOperation.WaitForCompletionAsync();
237237
```
@@ -267,7 +267,7 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
267267
{
268268
BlobContainerOptions = new BlobStorageResourceContainerOptions
269269
{
270-
BlobDirectoryPrefix = blobDirectoryPrefix
270+
BlobPrefix = blobDirectoryPrefix
271271
},
272272
TransferOptions = new TransferOptions()
273273
{
@@ -300,7 +300,7 @@ BlobContainerClientTransferOptions options = new BlobContainerClientTransferOpti
300300
{
301301
BlobContainerOptions = new BlobStorageResourceContainerOptions
302302
{
303-
BlobDirectoryPrefix = blobDirectoryPrefix
303+
BlobPrefix = blobDirectoryPrefix
304304
},
305305
TransferOptions = new TransferOptions()
306306
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
4747
public partial class BlobStorageResourceContainerOptions
4848
{
4949
public BlobStorageResourceContainerOptions() { }
50-
public string BlobDirectoryPrefix { get { throw null; } set { } }
5150
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceOptions BlobOptions { get { throw null; } set { } }
51+
public string BlobPrefix { get { throw null; } set { } }
5252
public Azure.Storage.Blobs.Models.BlobType? BlobType { get { throw null; } set { } }
5353
}
5454
public partial class BlobStorageResourceOptions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
4747
public partial class BlobStorageResourceContainerOptions
4848
{
4949
public BlobStorageResourceContainerOptions() { }
50-
public string BlobDirectoryPrefix { get { throw null; } set { } }
5150
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceOptions BlobOptions { get { throw null; } set { } }
51+
public string BlobPrefix { get { throw null; } set { } }
5252
public Azure.Storage.Blobs.Models.BlobType? BlobType { get { throw null; } set { } }
5353
}
5454
public partial class BlobStorageResourceOptions

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public BlobsStorageResourceProvider(Azure.Storage.StorageSharedKeyCredential cre
4747
public partial class BlobStorageResourceContainerOptions
4848
{
4949
public BlobStorageResourceContainerOptions() { }
50-
public string BlobDirectoryPrefix { get { throw null; } set { } }
5150
public Azure.Storage.DataMovement.Blobs.BlobStorageResourceOptions BlobOptions { get { throw null; } set { } }
51+
public string BlobPrefix { get { throw null; } set { } }
5252
public Azure.Storage.Blobs.Models.BlobType? BlobType { get { throw null; } set { } }
5353
}
5454
public partial class BlobStorageResourceOptions

sdk/storage/Azure.Storage.DataMovement.Blobs/samples/Sample01b_HelloWorldAsync.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public async Task ConstructFromClientsDemonstration()
136136
#region Snippet:ResourceConstruction_Blobs_WithOptions_VirtualDirectory
137137
BlobStorageResourceContainerOptions virtualDirectoryOptions = new()
138138
{
139-
BlobDirectoryPrefix = "blob/directory/prefix"
139+
BlobPrefix = "blob/directory/prefix"
140140
};
141141

142142
StorageResource virtualDirectoryResource = blobs.FromClient(
@@ -382,7 +382,7 @@ public async Task UploadDirectory_SasAsync()
382382
{
383383
// Block blobs are the default if not specified
384384
BlobType = BlobType.Block,
385-
BlobDirectoryPrefix = optionalDestinationPrefix,
385+
BlobPrefix = optionalDestinationPrefix,
386386
}));
387387
#endregion
388388
}
@@ -473,7 +473,7 @@ public async Task UploadDirectory_CompletedEventHandler()
473473
files.FromDirectory(sourcePath),
474474
blobs.FromClient(
475475
container,
476-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = "sample-blob-directory" }));
476+
new BlobStorageResourceContainerOptions() { BlobPrefix = "sample-blob-directory" }));
477477
}
478478
finally
479479
{
@@ -580,7 +580,7 @@ public async Task UploadDirectory_EventHandler_SasAsync()
580580
files.FromDirectory(sourcePath),
581581
blobs.FromClient(
582582
container,
583-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = "sample-blob-directory" }));
583+
new BlobStorageResourceContainerOptions() { BlobPrefix = "sample-blob-directory" }));
584584
}
585585
finally
586586
{
@@ -631,9 +631,9 @@ public async Task DownloadDirectory_EventHandler_ActiveDirectoryAuthAsync()
631631
LocalFilesStorageResourceProvider files = new();
632632
// Get a reference to a source blobs and upload sample content to download
633633
StorageResource sourceDirectory = blobs.FromClient(blobContainerClient,
634-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = "sample-blob-directory" });
634+
new BlobStorageResourceContainerOptions() { BlobPrefix = "sample-blob-directory" });
635635
StorageResource sourceDirectory2 = blobs.FromClient(blobContainerClient,
636-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = "sample-blob-directory2" });
636+
new BlobStorageResourceContainerOptions() { BlobPrefix = "sample-blob-directory2" });
637637
StorageResource destinationDirectory = files.FromDirectory(downloadPath);
638638
StorageResource destinationDirectory2 = files.FromDirectory(downloadPath2);
639639

@@ -668,7 +668,7 @@ await transferManager.StartTransferAsync(
668668
blobContainerUri,
669669
new BlobStorageResourceContainerOptions()
670670
{
671-
BlobDirectoryPrefix = optionalSourcePrefix
671+
BlobPrefix = optionalSourcePrefix
672672
}),
673673
destinationResource: files.FromDirectory(downloadPath));
674674
await transferOperation.WaitForCompletionAsync();
@@ -797,9 +797,9 @@ public async Task CopyDirectory()
797797
LocalFilesStorageResourceProvider files = new();
798798
// Get a reference to a source blobs and upload sample content to download
799799
StorageResource sourceDirectory1 = blobs.FromClient(container,
800-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = sourceDirectoryName });
800+
new BlobStorageResourceContainerOptions() { BlobPrefix = sourceDirectoryName });
801801
StorageResource sourceDirectory2 = blobs.FromClient(container,
802-
new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = sourceDirectoryName2 });
802+
new BlobStorageResourceContainerOptions() { BlobPrefix = sourceDirectoryName2 });
803803

804804
// Create destination paths
805805
StorageResource destinationDirectory1 = files.FromDirectory(downloadPath);
@@ -832,7 +832,7 @@ public async Task CopyDirectory()
832832
sourceContainerUri,
833833
new BlobStorageResourceContainerOptions()
834834
{
835-
BlobDirectoryPrefix = sourceDirectoryName
835+
BlobPrefix = sourceDirectoryName
836836
}),
837837
destinationResource: blobs.FromContainer(
838838
destinationContainerUri,
@@ -841,7 +841,7 @@ public async Task CopyDirectory()
841841
// all source blobs will be copied as a single type of destination blob
842842
// defaults to block blobs if unspecified
843843
BlobType = BlobType.Block,
844-
BlobDirectoryPrefix = downloadPath
844+
BlobPrefix = downloadPath
845845
}));
846846
await transferOperation.WaitForCompletionAsync();
847847
#endregion
@@ -1024,7 +1024,7 @@ public async Task UploadDirectory()
10241024
{
10251025
BlobContainerOptions = new BlobStorageResourceContainerOptions
10261026
{
1027-
BlobDirectoryPrefix = blobDirectoryPrefix
1027+
BlobPrefix = blobDirectoryPrefix
10281028
},
10291029
TransferOptions = new TransferOptions()
10301030
{
@@ -1094,7 +1094,7 @@ public async Task DownloadDirectory()
10941094
{
10951095
BlobContainerOptions = new BlobStorageResourceContainerOptions
10961096
{
1097-
BlobDirectoryPrefix = blobDirectoryPrefix
1097+
BlobPrefix = blobDirectoryPrefix
10981098
},
10991099
TransferOptions = new TransferOptions()
11001100
{

sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobContainerClientExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static Task<TransferOperation> UploadDirectoryAsync(
5454
{
5555
BlobContainerOptions = new()
5656
{
57-
BlobDirectoryPrefix = blobDirectoryPrefix,
57+
BlobPrefix = blobDirectoryPrefix,
5858
}
5959
},
6060
cancellationToken);
@@ -141,7 +141,7 @@ public static Task<TransferOperation> DownloadToDirectoryAsync(
141141
{
142142
BlobContainerOptions = new()
143143
{
144-
BlobDirectoryPrefix = blobDirectoryPrefix
144+
BlobPrefix = blobDirectoryPrefix
145145
},
146146
},
147147
cancellationToken);

sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public BlobStorageResourceContainer(BlobContainerClient blobContainerClient, Blo
5050
{
5151
BlobContainerClient = blobContainerClient;
5252
_options = options;
53-
DirectoryPrefix = _options?.BlobDirectoryPrefix;
53+
DirectoryPrefix = _options?.BlobPrefix;
5454

5555
_uri = DirectoryPrefix != null
5656
? new BlobUriBuilder(BlobContainerClient.Uri)
@@ -234,7 +234,7 @@ protected override Task CreateIfNotExistsAsync(CancellationToken cancellationTok
234234
protected override StorageResourceContainer GetChildStorageResourceContainer(string path)
235235
{
236236
BlobStorageResourceContainerOptions options = _options.DeepCopy();
237-
options.BlobDirectoryPrefix = string.Join("/", DirectoryPrefix, path);
237+
options.BlobPrefix = string.Join("/", DirectoryPrefix, path);
238238
return new BlobStorageResourceContainer(
239239
BlobContainerClient,
240240
options);

sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainerOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public BlobType? BlobType
3131
/// <summary>
3232
/// Optional. The directory prefix within the Blob Storage Container to use in the transfer.
3333
/// </summary>
34-
public string BlobDirectoryPrefix { get; set; }
34+
public string BlobPrefix { get; set; }
3535

3636
/// <summary>
3737
/// Optional. Additional options applied to each resource in the container.

0 commit comments

Comments
 (0)