예제 #1
0
        static int Main(string[] args)
        {
            var client = new MinioClient("https://s3.amazonaws.com", "ACCESSKEY", "SECRETKEY");

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

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

            return(0);
        }
예제 #2
0
        static int Main()
        {
            /// Note: s3 AccessKey and SecretKey needs to be added in App.config file
            /// See instructions in README.md on running examples for more information.
            var client = new MinioClient("s3.amazonaws.com", ConfigurationManager.AppSettings["s3AccessKey"],
                                         ConfigurationManager.AppSettings["s3SecretKey"]);

            var bucketExists = client.BucketExists("my-bucketname");

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

            return(0);
        }