locked
Check existence of CloudBlockBlob RRS feed

  • Question

  • Hi,

    I've a CloudBlockBlob (textfile) in a blob container, and before I read the stream with DownloadToStream(...) I want to check if the blob/file exists. But I couldn't find any method like "Exists". And the method GetBlockBlobReference(strFilename) of the container doesn't return null, no matter if the file exists or not.

    What's the best way to check the existence of a blob/file?

    Thanks

    Konrad

    Thursday, May 19, 2011 12:02 PM

Answers

All replies

  • Hi,

    this post from Steve Marx will help you for sure :-)

    http://blog.smarx.com/posts/testing-existence-of-a-windows-azure-blob


    Windows Azure Consultant http://cloudikka.wordpress.com/ (Don't click, if you don't understand czech language)
    • Marked as answer by KonradMD Thursday, May 19, 2011 12:17 PM
    Thursday, May 19, 2011 12:12 PM
  • Thanks - first for the information that is not implemented by default and second for the example code for own functions :-)
    Thursday, May 19, 2011 12:17 PM
  • That's OK. Thanks to Steve Marx for his post is being helpful :-)


    Windows Azure Consultant http://cloudikka.wordpress.com/ (Don't open this link, if you don't understand czech language)
    Thursday, May 19, 2011 12:24 PM