DeleteBlob Method

Deletes a blob.

Syntax

int DeleteBlob(const QString& qsBlob, int iDeleteAction);

Remarks

This method deletes the specified Blob in the container currently selected by Container. DeleteAction specifies how the delete operation should be handled; possible values are:

Single (0) Only delete the specified blob. The request will fail if any snapshots of the blob exist.
Snapshots Only (1) Delete all of the specified blob's snapshots, but not the blob itself.
Everything (2) Delete the specified blob and all of its snapshots.

Alternatively, if Snapshot is non-empty, the specified snapshot of Blob is deleted, and DeleteAction is ignored.

If the current Azure Storage account, specified by Account, has a delete retention policy enabled for the Blob service, then this method will only soft-delete blobs (and snapshots). Soft-deleted blobs and snapshots can be listed by enabling the IncludeSoftDeleted configuration setting before calling ListBlobs, and can be undeleted at any point before their retention period expires by calling UndeleteBlob.

If the specified blob has an active lease, its lease Id must be specified using LeaseId, or the request will fail.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Qt Edition - Version 20.0 [Build 8265]