This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see
Cake.AzureStorage.
Summary
Deletes an Azure Storage blobs by prefix.
Syntax
public static IEnumerable<string> DeleteBlobsByPrefix(this ICakeContext context, AzureStorageSettings settings)
Examples
Task("PackageAfterDelete")
.Does(() => {
var settings = new AzureStorageSettings();
settings.AccountName = "AccountName";
settings.Key = "API KEY";
settings.ContainerName = "ContainerName";
settings.BlobName = "PrefixToSearchBy";
var deletedLog = DeleteBlobsByPrefix(settings);
foreach (var line in deletedLog){
Information(line);
}
settings.BlobName = "NameToUploadAs";
var filePath = new FilePath("./location/of/file/to/upload");
UploadFileToBlob(settings, filePath));
});
Attributes
Type |
Description |
CakeMethodAliasAttribute |
|
Parameters
Name |
Type |
Description |
context |
ICakeContext |
The context. |
settings |
AzureStorageSettings |
Azure Storage Settings. |
Return Value
Type |
Description |
IEnumerable<string> |
|