Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using blob directories


The Azure Blob service uses a simple organizational structure for containers and blobs. A storage account has zero or more containers, each of which contains zero or more blobs. Containers might contain only blobs and not contain other containers. There is no hierarchy for containers.

The Azure Storage library provides support for a simulation of a hierarchical directory structure through an ability to parse blob names that contain a special delimiter character and navigates to the list of blobs while taking the delimiter into account. This delimiter has the forward slash symbol (/). The Azure Storage Client library exposes this feature through the CloudBlobDirectory class.

The CloudBlobDirectory class provides methods that allow blobs to be enumerated in a way that takes into account the directory structure built into the naming convention used. A blob name can include multiple levels of directory.

A CloudBlobDirectory object can be created using either CloudBlobClient...