AzureBlobFileSystem.AzureBlobStorageProvider.ListFolders C# (CSharp) Method

ListFolders() public method

public ListFolders ( string path ) : IEnumerable
path string
return IEnumerable
        public IEnumerable<IStorageFolder> ListFolders(string path)
        {
            path = path ?? String.Empty;

            var container = EnsurePathIsRelativeAndEnsureContainer(ref path);

            // return root folders
            if (path == String.Empty)
            {
                return container.ListBlobs()
                    .OfType<CloudBlobDirectory>()
                    .Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, this))
                    .ToList();
            }

            return container.GetDirectoryReference(path)
                .ListBlobs()
                .OfType<CloudBlobDirectory>()
                .Select<CloudBlobDirectory, IStorageFolder>(d => new AzureBlobFolderStorage(d, this))
                .ToList();
        }