Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:25:43+00:00 2026-05-29T12:25:43+00:00

In the software that I am programming, I am attempting to create a virtual

  • 0

In the software that I am programming, I am attempting to create a virtual file system over the blobs structure of Azure.

Many times in the process, I get a path from the system and I need to tell whether the path is of a Blob or just a virtual BlobDirectory that azure provides. I did this by casting it from one form to another and handling the error.

But now, if I know that a path points to a virtual directory, how can I check whether this virtual directory exists or not?

I can get the reference to the CloudBlobDirectory with the following code:

var blobDirectory = client.GetBlobDirectoryReference("Path_to_dir");
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:25:44+00:00Added an answer on May 29, 2026 at 12:25 pm

    In blob storage, directories don’t exist as an item by themselves. What you can have is a blob that has a name that can be interpreted as being in a directory. If you look at the underlying REST API you’ll see that that there’s nothing in there about directories. What the storage client library is doing for you is searching for blobs that start with the directory name then the delimiter e.g. “DirectoryA/DirectoryB/FileName.txt”. What this means is that for a directory to exist it must contain a blob. To check if the directory exists you can try either:

    var blobDirectory = client.GetBlobDirectoryReference("Path_to_dir");
    bool directoryExists = blobDirectory.ListBlobs().Count() > 0
    

    or

    bool directoryExists = client.ListBlobsWithPrefix("DirectoryA/DirectoryB/").Count() > 0
    

    I’m aware that listing everything in the directory just to get the count isn’t that great an idea, I’m sure you can come up with a better method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a new software that can be controlled by email. It
In support of software internationalization, many programming languages and platforms support a means of
I have a simple software that is made in Delphi 7, and it crashes
I'm developing software that writes to a tiny LCD screen (less than 1 x
I'm planning software that's an OLAP application at its heart (it helps analyse metering
What is some good software that is written with WPF? I keep hearing about
I work with software that is kept in svn for version control. I would
We have this software that has a webservices component. Now, the administrator of this
I'm porting a software that build from 16bit color depth to 18bit color depth.
We have software that runs fine under a normal Windows installation but when we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.