azure-sdk-for-cpp/sdk/storage/sample/blob_getting_started.cpp
JinmingHu 5fc6fea9f4
Auto-generated protocol layer of Container and BlockBlob (#144)
* add blob service auto generated protocol layer

* Add storage uri builder

* integrate with pipeline

* Add libxml2 dependency

* Fix variables name

* Rename variable and function name

* Move xxx_options.hpp out of internal directory

* Rename FromConnectionString -> CreateFromConnectionString
2020-06-04 13:21:08 +08:00

20 lines
534 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT
#include "blobs/blob.hpp"
#include <fstream>
#include <iostream>
int main()
{
using namespace Azure::Storage::Blobs;
BlobClient blob_client("https://targettest.blob.core.windows.net/container1/file_8M");
auto properties = blob_client.GetProperties();
std::cout << properties.ContentLength << std::endl;
auto downloaded_data = blob_client.Download();
std::cout << downloaded_data.BodyBuffer.size() << std::endl;
return 0;
}