目前我正在使用 Amazon S3 for 3.5 .net 进行 CRUD 操作,我使用的是 3.1.5 版本。
我找到了这个代码来检查存储桶是否存在:
AmazonS3Client s3Client = new AmazonS3Client ();
///setup the client configuration
S3DirectoryInfo directoryInfo = new S3DirectoryInfo(s3Client, bucketName);
bucketExists = directoryInfo.Exists;
Run Code Online (Sandbox Code Playgroud)
是否有另一种优雅的方式(c# 代码)来检查存储桶是否存在?