Amazon S3 and S3-compatible storage (e.g. Cloudflare R2) file system support for TagBites.IO, built on AWSSDK.S3. Browse, read and write an S3 bucket through the same FileSystem API used for local disk and other storages.
dotnet add package TagBites.IO.S3
Targets netstandard2.1. Depends on AWSSDK.S3.
using TagBites.IO.S3;
var fs = S3FileSystem.Create(serviceUrl, accessKey, secretKey, bucketName);
var file = fs.GetFile("/reports/summary.txt");
file.WriteAllText("Hello world!");
var content = file.ReadAllText();using TagBites.IO.S3;
var fs = S3FileSystem.CreateCloudflareR2FileSystem(accountId, accessKey, secretKey, bucketName);S3 has no real directory concept, so directories are represented as object key prefixes.
- Asynchronous operations. Synchronous calls run on top of them.
- Metadata: none.
- Object storage: a directory exists only as a prefix of an object key (
FileSystemFlags.IsDirectoryAsPrefix), so an empty directory cannot be represented. - The ETag of a multipart upload is not an MD5 hash and is not reported as one.