-
Notifications
You must be signed in to change notification settings - Fork 312
[Storage] exists()
for BlobClient and BlobContainerClient
#3010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Storage] exists()
for BlobClient and BlobContainerClient
#3010
Conversation
…g tests, re-record
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds convenience exists()
methods to both BlobClient
and BlobContainerClient
that return a boolean indicating whether the resource exists. The implementation uses the existing get_properties()
method and returns true
if the call succeeds or false
if it fails.
- Added
exists()
method toBlobClient
andBlobContainerClient
- Added comprehensive test coverage for the new methods
- Updated test asset tag
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
sdk/storage/azure_storage_blob/src/clients/blob_client.rs | Added exists() method that checks blob existence using get_properties() |
sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs | Added exists() method that checks container existence using get_properties() |
sdk/storage/azure_storage_blob/tests/blob_client.rs | Added test assertions for blob existence checks in various scenarios |
sdk/storage/azure_storage_blob/tests/blob_container_client.rs | Added test assertions for container existence checks |
sdk/storage/azure_storage_blob/assets.json | Updated test asset tag |
.tsp:
Azure/azure-rest-api-specs#37542exists()
forBlobClient
andBlobContainerClient
StorageErrorCode
enum from generated code changes.