Skip to content

Add Directory property to GetBlobs #1

Description

@kzu

When a given container has a large amount of blobs organized in subdirectories, enumerating all
with GetBlobs is impractical.

If the caller build script can determine the subdirectory to fetch, however, things might be way more
manageable.

This could be as simple as:

var dir = container.GetDirectoryReference("");
foreach (var subDir in Directory.Split('/', '\\'))
{
	dir = dir.GetDirectoryReference(subDir);
}

var blobs = dir.ListBlobs().Select(d => d.Uri.OriginalString).ToList().Dump();

(that's working code in a LINQPad query ;).

If I get some spare time, I'd like to send a PR. But putting it here so I don't forget, and maybe you get to do it before :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions