Is there an easy way to check whether a storage container already exists? Same for a blob.
Maybe the easiest way today is calling getProperties on BlobClient and checking for a 404 status code. I think we should implement exists, however! /cc @XiaoningLiu @jeremymeng
Agree
Maybe the easiest way today is calling getProperties on BlobClient and checking for a 404 status code. I think we should implement
exists, however! /cc @XiaoningLiu @jeremymeng
I confirmed with @JeffreyRichter that exists makes some sense, but there's a concern that exists encourages coding patterns that might seem reliable but aren't in practice. For example, upload-if-not-exists might be implemented as if (!(await client.exists())) { await client.upload() } but another node might be running the same check at the same time and the uploads will still clobber each other.
It's still worth implementing exists, though, I think. Python will likely be adding it as well.
hey guys has this ever been implemented?
yeah, has it?
implemented in #5333
Most helpful comment
Maybe the easiest way today is calling getProperties on BlobClient and checking for a 404 status code. I think we should implement
exists, however! /cc @XiaoningLiu @jeremymeng