6#include "azure/storage/files/shares/share_client.hpp"
7#include "azure/storage/files/shares/share_options.hpp"
8#include "azure/storage/files/shares/share_responses.hpp"
10#include <azure/core/internal/http/pipeline.hpp>
11#include <azure/core/response.hpp>
12#include <azure/storage/common/storage_credential.hpp>
17namespace Azure {
namespace Storage {
namespace Files {
namespace Shares {
19 class ShareFileClient;
37 const std::string& connectionString,
38 const std::string& shareName,
39 const std::string& directoryName,
49 const std::string& shareDirectoryUrl,
50 std::shared_ptr<StorageSharedKeyCredential> credential,
60 const std::string& shareDirectoryUrl,
61 std::shared_ptr<Core::Credentials::TokenCredential> credential,
71 const std::string& shareDirectoryUrl,
79 std::string
GetUrl()
const {
return m_shareDirectoryUrl.GetAbsoluteUrl(); }
116 Azure::Response<Models::CreateDirectoryResult>
Create(
118 const Azure::Core::Context& context = Azure::Core::Context())
const;
129 const Azure::Core::Context& context = Azure::Core::Context())
const;
142 const std::string& fileName,
143 const std::string& destinationFilePath,
145 const Azure::Core::Context& context = Azure::Core::Context())
const;
159 const std::string& subdirectoryName,
160 const std::string& destinationDirectoryPath,
162 const Azure::Core::Context& context = Azure::Core::Context())
const;
171 Azure::Response<Models::DeleteDirectoryResult>
Delete(
173 const Azure::Core::Context& context = Azure::Core::Context())
const;
186 const Azure::Core::Context& context = Azure::Core::Context())
const;
197 const Azure::Core::Context& context = Azure::Core::Context())
const;
210 const Azure::Core::Context& context = Azure::Core::Context())
const;
222 Storage::Metadata metadata,
224 const Azure::Core::Context& context = Azure::Core::Context())
const;
236 const Azure::Core::Context& context = Azure::Core::Context())
const;
247 const Azure::Core::Context& context = Azure::Core::Context())
const;
258 const std::string& handleId,
260 const Azure::Core::Context& context = Azure::Core::Context())
const;
273 const Azure::Core::Context& context = Azure::Core::Context())
const;
276 Azure::Core::Url m_shareDirectoryUrl;
277 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> m_pipeline;
278 Nullable<bool> m_allowTrailingDot;
279 Nullable<bool> m_allowSourceTrailingDot;
280 Nullable<Models::ShareTokenIntent> m_shareTokenIntent;
283 Azure::Core::Url shareDirectoryUrl,
284 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> pipeline)
285 : m_shareDirectoryUrl(std::move(shareDirectoryUrl)), m_pipeline(std::move(pipeline))
Response type for Azure::Storage::Files::Shares::ShareDirectoryClient::ForceCloseAllHandles.
Definition share_responses.hpp:912
Response type for Azure::Storage::Files::Shares::ShareDirectoryClient::ListHandles.
Definition share_responses.hpp:890
Response type for Azure::Storage::Files::Shares::ShareDirectoryClient::ListFilesAndDirectories.
Definition share_responses.hpp:795
The ShareClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_client.hpp:24
The ShareDirectoryClient allows you to manipulate Azure Storage shares and their directories and file...
Definition share_directory_client.hpp:25
Azure::Response< Models::ForceCloseDirectoryHandleResult > ForceCloseHandle(const std::string &handleId, const ForceCloseDirectoryHandleOptions &options=ForceCloseDirectoryHandleOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Closes a handle opened on a directory at the service.
std::string GetUrl() const
Gets the directory's primary URL endpoint.
Definition share_directory_client.hpp:79
Azure::Response< Models::SetDirectoryPropertiesResult > SetProperties(Models::FileSmbProperties smbProperties, const SetDirectoryPropertiesOptions &options=SetDirectoryPropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the properties of the directory.
ListFilesAndDirectoriesPagedResponse ListFilesAndDirectories(const ListFilesAndDirectoriesOptions &options=ListFilesAndDirectoriesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns a sequence of files and subdirectories in this directory. Enumerating the files and directori...
Azure::Response< Models::DeleteDirectoryResult > Delete(const DeleteDirectoryOptions &options=DeleteDirectoryOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Deletes the directory.
Azure::Response< ShareFileClient > RenameFile(const std::string &fileName, const std::string &destinationFilePath, const RenameFileOptions &options=RenameFileOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Renames a file. This API does not support renaming a file from one share to another,...
Azure::Response< Models::SetDirectoryMetadataResult > SetMetadata(Storage::Metadata metadata, const SetDirectoryMetadataOptions &options=SetDirectoryMetadataOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the metadata of the directory.
ShareDirectoryClient WithShareSnapshot(const std::string &shareSnapshot) const
Initializes a new instance of the ShareDirectoryClient class with an identical URL source but the spe...
Azure::Response< Models::DeleteDirectoryResult > DeleteIfExists(const DeleteDirectoryOptions &options=DeleteDirectoryOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Deletes the directory if it exists.
static ShareDirectoryClient CreateFromConnectionString(const std::string &connectionString, const std::string &shareName, const std::string &directoryName, const ShareClientOptions &options=ShareClientOptions())
Create A ShareDirectoryClient from connection string to manage a File Share Directory resource.
ShareDirectoryClient(const std::string &shareDirectoryUrl, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareDirectoryClient using anonymous access or shared access signature.
ShareFileClient GetFileClient(const std::string &fileName) const
Create a ShareFileClient from current ShareDirectoryClient.
Azure::Response< Models::DirectoryProperties > GetProperties(const GetDirectoryPropertiesOptions &options=GetDirectoryPropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the properties of the directory.
ListDirectoryHandlesPagedResponse ListHandles(const ListDirectoryHandlesOptions &options=ListDirectoryHandlesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Returns a sequence of the open handles on a directory or a file. Enumerating the handles may make mul...
Azure::Response< Models::CreateDirectoryResult > CreateIfNotExists(const CreateDirectoryOptions &options=CreateDirectoryOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates the directory if it does not exist.
Azure::Response< Models::CreateDirectoryResult > Create(const CreateDirectoryOptions &options=CreateDirectoryOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates the directory.
ShareDirectoryClient(const std::string &shareDirectoryUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareDirectoryClient using shared key authentication.
Azure::Response< ShareDirectoryClient > RenameSubdirectory(const std::string &subdirectoryName, const std::string &destinationDirectoryPath, const RenameDirectoryOptions &options=RenameDirectoryOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Renames a directory. This API does not support renaming a directory from one share to another,...
ForceCloseAllDirectoryHandlesPagedResponse ForceCloseAllHandles(const ForceCloseAllDirectoryHandlesOptions &options=ForceCloseAllDirectoryHandlesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Closes all handles opened on a directory at the service. Optionally supports recursively closing hand...
ShareDirectoryClient(const std::string &shareDirectoryUrl, std::shared_ptr< Core::Credentials::TokenCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareDirectoryClient using shared key authentication.
ShareDirectoryClient GetSubdirectoryClient(const std::string &subdirectoryName) const
Create a ShareDirectoryClient that's a sub directory of the current ShareDirectoryClient.
The ShareFileClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_file_client.hpp:24
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::Create.
Definition share_options.hpp:570
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::Delete.
Definition share_options.hpp:728
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::ForceCloseAllHandles.
Definition share_options.hpp:855
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::ForceCloseHandle.
Definition share_options.hpp:847
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::GetProperties.
Definition share_options.hpp:736
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::ListHandles.
Definition share_options.hpp:819
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::ListFilesAndDirectories.
Definition share_options.hpp:780
The SMB related properties for the file.
Definition rest_client.hpp:1060
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::RenameSubdirectory.
Definition share_options.hpp:670
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::RenameFile.
Definition share_options.hpp:606
Optional parameters for Azure::Storage::Files::Shares::ShareDirectoryClient::SetProperties.
Definition share_options.hpp:744
Client options used to initialize share clients.
Definition share_options.hpp:265