Ejemplo n.º 1
0
        public async IAsyncEnumerable <IReadOnlyCollection <FileListItem> > List(StringPath path = null, bool allDirectories = false)
        {
            BlobContinuationToken token = null;

            do
            {
                var p = path != null?BasePathSansContainer.Add(path) : BasePathSansContainer;

                var res = await Container.ListBlobsSegmentedAsync(p + "/", allDirectories, BlobListingDetails.None,
                                                                  null, token, null, null);

                var items = res.Results.OfType <ICloudBlob>().Select(r =>
                                                                     new FileListItem {
                    Path     = new StringPath(r.Uri.AbsolutePath).RelativePath(BasePath),
                    Modified = r.Properties.LastModified
                });

                yield return(items.ToReadOnly());

                token = res.ContinuationToken;
            } while (token != null);
        }
Ejemplo n.º 2
0
 string ContainerRelativePath(StringPath path = null) => path == null ? BasePathSansContainer : BasePathSansContainer.Add(path);
Ejemplo n.º 3
0
 public CloudBlockBlob BlobRef(StringPath path) => Container.GetBlockBlobReference(BasePathSansContainer.Add(path));