converting chunk_property to blob_property output

This commit is contained in:
seguler 2018-02-27 08:38:06 +00:00
Родитель 70fd2f55b4
Коммит db09248c42
4 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -415,7 +415,7 @@ namespace microsoft_azure { namespace storage {
/// <param name="destPath">The target file path.</param>
/// <param name="parallel">A size_t value indicates the maximum parallelism can be used in this request.</param>
/// <returns>A <see cref="storage_outcome" /> object that represents the properties (etag, last modified time and size) from the first chunk retrieved.</returns>
void download_blob_to_file(const std::string &container, const std::string &blob, const std::string &destPath, chunk_property &returned_properties, size_t parallel = 9);
void download_blob_to_file(const std::string &container, const std::string &blob, const std::string &destPath, blob_property &returned_properties, size_t parallel = 9);
/// <summary>
/// Gets the property of a blob.

Просмотреть файл

@ -7,6 +7,7 @@
#include "http_base.h"
#include "storage_account.h"
#include "storage_request_base.h"
#include "get_blob_request_base.h"
namespace microsoft_azure {
namespace storage {
@ -32,6 +33,14 @@ namespace microsoft_azure {
{
}
blob_property(const chunk_property property)
:m_valid(true)
{
last_modified = property.last_modified;
size = property.size;
etag = property.etag;
}
void set_valid(bool valid)
{
m_valid = valid;

Просмотреть файл

@ -622,7 +622,7 @@ namespace microsoft_azure {
}
}
void blob_client_wrapper::download_blob_to_file(const std::string &container, const std::string &blob, const std::string &destPath, chunk_property &properties, size_t parallel)
void blob_client_wrapper::download_blob_to_file(const std::string &container, const std::string &blob, const std::string &destPath, blob_property &returned_properties, size_t parallel)
{
if(!is_valid())
{
@ -725,7 +725,7 @@ namespace microsoft_azure {
return;
}
properties = firstChunk.response();
returned_properties = (blob_property)firstChunk.response();
return;
}

Просмотреть файл

@ -109,7 +109,7 @@ int azs_open(const char *path, struct fuse_file_info *fi)
}
errno = 0;
chunk_property properties;
blob_property properties = {false};
azure_blob_client_wrapper->download_blob_to_file(str_options.containerName, pathString.substr(1), mntPathString, properties);
if (errno != 0)
{