JuliaServices / CloudStore.jl

A simple, consistent, and performant API for interacting with common cloud storage abstractions
Other
16 stars 8 forks source link

Add `exists` to check if blob exists #36

Open msagarpatel opened 1 year ago

msagarpatel commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.