BucketExists() public method

Returns true if the specified bucketName exists, otherwise returns false.
public BucketExists ( string bucketName ) : bool
bucketName string Bucket to test existence of
return bool
コード例 #1
0
        static int Main(string[] args)
        {
            var client = new MinioClient("https://s3.amazonaws.com", "ACCESSKEY", "SECRETKEY");

            var bucketExists = client.BucketExists("bucketName");

            if (bucketExists)
            {
                Console.Out.WriteLine("Bucket: {0} exists..", "bucketName");
            }
            else
            {
                Console.Out.WriteLine("Bucket: {0} does not exist..", "bucketName");
            }

            return 0;
        }