Amazon.S3.IO.S3FileInfo.S3FileInfo C# (CSharp) Method

S3FileInfo() public method

Initialize a new instance of the S3FileInfo class for the specified S3 bucket and S3 object key.
public S3FileInfo ( IAmazonS3 s3Client, string bucket, string key ) : System
s3Client IAmazonS3 S3 client which is used to access the S3 resources.
bucket string Name of the S3 bucket.
key string The S3 object key.
return System
        public S3FileInfo(IAmazonS3 s3Client, string bucket, string key)
        {
            if (s3Client == null)
            {
                throw new ArgumentNullException("s3Client");
            }
            if (String.IsNullOrEmpty(bucket))
            {
                throw new ArgumentNullException("bucket");
            }
            if (String.IsNullOrEmpty(key) || String.Equals(key, "\\"))
            {
                throw new ArgumentNullException("key");
            }

            if (key.EndsWith("\\", StringComparison.Ordinal))
            {
                throw new ArgumentException("key is a directory name");
            }

            this.s3Client = s3Client;
            this.bucket = bucket;
            this.key = key;
        }