Skip to content
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

Add exists to check if blob exists #36

Open
msagarpatel opened this issue Mar 26, 2023 · 2 comments
Open

Add exists to check if blob exists #36

msagarpatel opened this issue Mar 26, 2023 · 2 comments

Comments

@msagarpatel
Copy link

This can be achieved by checking the output of list(...; prefix), but having an official function would be nice.

Azure's C# SDK has a CloudBlob.Exists(BlobRequestOptions, OperationContext) function.

@quinnj
Copy link
Member

quinnj commented Mar 31, 2023

This is what we currently have the head verb functions for; do you think there are advantages to using list instead? Or I guess head probably throws if it doesn't exist so you have to try-catch?

@msagarpatel
Copy link
Author

I forgot to followup after you explained head to me (thanks again!). head does indeed throw if the blob does not exist, so I ended up using head with a try-catch instead. The exists would be nice since it wouldn't throw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants