Added GetSubDirectory. (#524)

This commit is contained in:
Kan Tang 2020-08-26 07:43:08 +08:00 committed by GitHub
parent 9c9e631c0d
commit b87bd0816c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -72,6 +72,13 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
*/
FileClient GetFileClient(const std::string& path) const;
/**
* @brief Create a DirectoryClient from current DirectoryClient
* @param path Path of the directory under the current directory.
* @return DirectoryClient
*/
DirectoryClient GetSubDirectoryClient(const std::string& path) const;
/**
* @brief Gets the directory's primary uri endpoint. This is the endpoint used for blob
* storage available features in DataLake.

View File

@ -131,6 +131,15 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake {
return FileClient(std::move(builder), std::move(blobClient), m_pipeline);
}
DirectoryClient DirectoryClient::GetSubDirectoryClient(const std::string& path) const
{
auto builder = m_dfsUri;
builder.AppendPath(path, true);
auto blobClient = m_blobClient;
blobClient.m_blobUrl.AppendPath(path, true);
return DirectoryClient(std::move(builder), std::move(blobClient), m_pipeline);
}
Azure::Core::Response<RenameDirectoryResult> DirectoryClient::Rename(
const std::string& destinationPath,
const RenameDirectoryOptions& options) const