Table of Contents

Class S3ObjectListing

Namespace
EncDotNet.S100.Collections.RemoteCatalogues
Assembly
EncDotNet.S100.Collections.dll

Lists objects under a prefix of a public (anonymous) Amazon S3 bucket with ListObjectsV2, for the sizes and dates a remote exchange catalogue does not carry. Works for virtual-hosted URLs (https://bucket.s3.amazonaws.com/key, optionally with a region) and path-style ones (https://s3.amazonaws.com/bucket/key).

public static class S3ObjectListing
Inheritance
S3ObjectListing
Inherited Members

Methods

ListAsync(HttpClient, Uri, CancellationToken)

Lists every object whose URL lies under prefixUri (a "folder" URL ending in /, or any key prefix), following continuation tokens.

public static Task<IReadOnlyList<S3Object>> ListAsync(HttpClient httpClient, Uri prefixUri, CancellationToken cancellationToken = default)

Parameters

httpClient HttpClient
prefixUri Uri
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<S3Object>>

Exceptions

ArgumentException

prefixUri is not an S3 URL.

HttpRequestException

The bucket could not be listed.

TryParse(Uri, out Uri, out string)

Returns true when uri addresses an object (or prefix) in an S3 bucket, with the bucket's base URL (ending in /) and the key.

public static bool TryParse(Uri uri, out Uri bucketUri, out string key)

Parameters

uri Uri
bucketUri Uri
key string

Returns

bool