6#include "azure/storage/files/shares/share_client.hpp"
7#include "azure/storage/files/shares/share_directory_client.hpp"
8#include "azure/storage/files/shares/share_options.hpp"
9#include "azure/storage/files/shares/share_responses.hpp"
11#include <azure/core/internal/http/pipeline.hpp>
12#include <azure/core/response.hpp>
13#include <azure/storage/common/storage_credential.hpp>
18namespace Azure {
namespace Storage {
namespace Files {
namespace Shares {
36 const std::string& connectionString,
37 const std::string& shareName,
38 const std::string& fileName,
48 const std::string& shareFileUrl,
49 std::shared_ptr<StorageSharedKeyCredential> credential,
59 const std::string& shareFileUrl,
60 std::shared_ptr<Core::Credentials::TokenCredential> credential,
70 const std::string& shareFileUrl,
78 std::string
GetUrl()
const {
return m_shareFileUrl.GetAbsoluteUrl(); }
99 Azure::Response<Models::CreateFileResult>
Create(
102 const Azure::Core::Context& context = Azure::Core::Context())
const;
111 Azure::Response<Models::DeleteFileResult>
Delete(
113 const Azure::Core::Context& context = Azure::Core::Context())
const;
124 const Azure::Core::Context& context = Azure::Core::Context())
const;
134 Azure::Response<Models::DownloadFileResult>
Download(
136 const Azure::Core::Context& context = Azure::Core::Context())
const;
154 const Azure::Core::Context& context = Azure::Core::Context())
const;
167 const std::string& fileName,
169 const Azure::Core::Context& context = Azure::Core::Context())
const;
183 const uint8_t* buffer,
186 const Azure::Core::Context& context = Azure::Core::Context())
const;
199 const std::string& fileName,
201 const Azure::Core::Context& context = Azure::Core::Context())
const;
217 std::string copySource,
219 const Azure::Core::Context& context = Azure::Core::Context())
const;
233 const Azure::Core::Context& context = Azure::Core::Context())
const;
244 const Azure::Core::Context& context = Azure::Core::Context())
const;
259 const Azure::Core::Context& context = Azure::Core::Context())
const;
271 Storage::Metadata metadata,
273 const Azure::Core::Context& context = Azure::Core::Context())
const;
286 Azure::Core::IO::BodyStream& content,
288 const Azure::Core::Context& context = Azure::Core::Context())
const;
303 const Azure::Core::Context& context = Azure::Core::Context())
const;
314 const Azure::Core::Context& context = Azure::Core::Context())
const;
326 std::string previousShareSnapshot,
328 const Azure::Core::Context& context = Azure::Core::Context())
const;
339 const Azure::Core::Context& context = Azure::Core::Context())
const;
350 const std::string& handleId,
352 const Azure::Core::Context& context = Azure::Core::Context())
const;
363 const Azure::Core::Context& context = Azure::Core::Context())
const;
376 int64_t destinationOffset,
377 const std::string& sourceUri,
378 const Azure::Core::Http::HttpRange& sourceRange,
380 const Azure::Core::Context& context = Azure::Core::Context())
const;
391 const std::string& targetFile,
393 const Azure::Core::Context& context = Azure::Core::Context())
const;
396 Azure::Core::Url m_shareFileUrl;
397 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> m_pipeline;
398 Nullable<bool> m_allowTrailingDot;
399 Nullable<bool> m_allowSourceTrailingDot;
400 Nullable<Models::ShareTokenIntent> m_shareTokenIntent;
403 Azure::Core::Url shareFileUrl,
404 std::shared_ptr<Azure::Core::Http::_internal::HttpPipeline> pipeline)
405 : m_shareFileUrl(std::move(shareFileUrl)), m_pipeline(std::move(pipeline))
Response type for Azure::Storage::Files::Shares::ShareFileClient::ForceCloseAllHandles.
Definition share_responses.hpp:865
Response type for Azure::Storage::Files::Shares::ShareFileClient::ListHandles.
Definition share_responses.hpp:844
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
The ShareFileClient allows you to manipulate Azure Storage shares and their directories and files.
Definition share_file_client.hpp:24
Azure::Response< Models::DeleteFileResult > DeleteIfExists(const DeleteFileOptions &options=DeleteFileOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Deletes the file if it exists.
ShareFileClient(const std::string &shareFileUrl, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareFileClient using anonymous access or shared access signature.
Azure::Response< Models::ClearFileRangeResult > ClearRange(int64_t offset, int64_t length, const ClearFileRangeOptions &options=ClearFileRangeOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Clears some range of data within the file.
Azure::Response< Models::UploadFileRangeResult > UploadRange(int64_t offset, Azure::Core::IO::BodyStream &content, const UploadFileRangeOptions &options=UploadFileRangeOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Uploads some data to a range of the file.
Azure::Response< Models::GetFileRangeListResult > GetRangeList(const GetFileRangeListOptions &options=GetFileRangeListOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the list of valid range from the file within specified range.
Azure::Response< Models::FileProperties > GetProperties(const GetFilePropertiesOptions &options=GetFilePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the properties of a file.
Azure::Response< Models::DownloadFileToResult > DownloadTo(uint8_t *buffer, size_t bufferSize, const DownloadFileToOptions &options=DownloadFileToOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Downloads a file or a file range from the service to a memory buffer using parallel requests.
Azure::Response< Models::DownloadFileResult > Download(const DownloadFileOptions &options=DownloadFileOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Open a stream for the file's content, or a range of the file's content that can be used to download t...
Azure::Response< Models::SetFileMetadataResult > SetMetadata(Storage::Metadata metadata, const SetFileMetadataOptions &options=SetFileMetadataOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the metadata of the file.
ShareFileClient WithShareSnapshot(const std::string &shareSnapshot) const
Initializes a new instance of the ShareFileClient class with an identical URL source but the specifie...
Azure::Response< Models::DownloadFileToResult > DownloadTo(const std::string &fileName, const DownloadFileToOptions &options=DownloadFileToOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Downloads a file or a file range from the service to a memory buffer using parallel requests.
ShareFileClient(const std::string &shareFileUrl, std::shared_ptr< Core::Credentials::TokenCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareFileClient using shared key authentication.
Azure::Response< Models::GetFileRangeListResult > GetRangeListDiff(std::string previousShareSnapshot, const GetFileRangeListOptions &options=GetFileRangeListOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Gets the list of valid range from the file within specified range that have changed since previousSha...
ListFileHandlesPagedResponse ListHandles(const ListFileHandlesOptions &options=ListFileHandlesOptions(), 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::SetFilePropertiesResult > SetProperties(const Models::FileHttpHeaders &httpHeaders, const Models::FileSmbProperties &smbProperties, const SetFilePropertiesOptions &options=SetFilePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Sets the properties of the file, or resize a file specifying NewSize in options.
Azure::Response< Models::UploadFileFromResult > UploadFrom(const uint8_t *buffer, size_t bufferSize, const UploadFileFromOptions &options=UploadFileFromOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new file, or updates the content of an existing file. Updating an existing file overwrites ...
ForceCloseAllFileHandlesPagedResponse ForceCloseAllHandles(const ForceCloseAllFileHandlesOptions &options=ForceCloseAllFileHandlesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Closes all handles opened on a file at the service.
static ShareFileClient CreateFromConnectionString(const std::string &connectionString, const std::string &shareName, const std::string &fileName, const ShareClientOptions &options=ShareClientOptions())
Create A ShareFileClient from connection string to manage a File Share File resource.
Azure::Response< Models::ForceCloseFileHandleResult > ForceCloseHandle(const std::string &handleId, const ForceCloseFileHandleOptions &options=ForceCloseFileHandleOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Closes a handle opened on a file at the service.
Azure::Response< Models::CreateFileHardLinkResult > CreateHardLink(const std::string &targetFile, const CreateHardLinkOptions &options=CreateHardLinkOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
NFS only. Creates a hard link to the file specified by path.
Azure::Response< Models::DeleteFileResult > Delete(const DeleteFileOptions &options=DeleteFileOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Deletes the file.
Azure::Response< Models::UploadFileFromResult > UploadFrom(const std::string &fileName, const UploadFileFromOptions &options=UploadFileFromOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates a new file, or updates the content of an existing file. Updating an existing file overwrites ...
StartFileCopyOperation StartCopy(std::string copySource, const StartFileCopyOptions &options=StartFileCopyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Starts copy the file specified from source URI to the file this client points to.
Azure::Response< Models::UploadFileRangeFromUriResult > UploadRangeFromUri(int64_t destinationOffset, const std::string &sourceUri, const Azure::Core::Http::HttpRange &sourceRange, const UploadFileRangeFromUriOptions &options=UploadFileRangeFromUriOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Upload a range from the source URI to this file's specific range.
Azure::Response< Models::AbortFileCopyResult > AbortCopy(std::string copyId, const AbortFileCopyOptions &options=AbortFileCopyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Aborts copying the file specified with the copy ID.
std::string GetUrl() const
Gets the file's primary URL endpoint.
Definition share_file_client.hpp:78
Azure::Response< Models::CreateFileResult > Create(int64_t fileSize, const CreateFileOptions &options=CreateFileOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
Creates the file.
ShareFileClient(const std::string &shareFileUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const ShareClientOptions &options=ShareClientOptions())
Initialize a new instance of ShareFileClient using shared key authentication.
ShareLeaseClient allows you to manipulate Azure Storage leases on shares and files.
Definition share_lease_client.hpp:18
A long-running operation to copy a file.
Definition share_responses.hpp:725
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::AbortCopy.
Definition share_options.hpp:1036
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::ClearRange.
Definition share_options.hpp:1130
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::Create.
Definition share_options.hpp:875
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::CreateHardLink.
Definition share_options.hpp:1395
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::Delete.
Definition share_options.hpp:921
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::Download.
Definition share_options.hpp:932
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::DownloadTo.
Definition share_options.hpp:1253
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::ForceCloseAllHandles.
Definition share_options.hpp:1239
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::ForceCloseHandle.
Definition share_options.hpp:1231
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::GetProperties.
Definition share_options.hpp:1047
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::GetRangeList.
Definition share_options.hpp:1184
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::ListHandles.
Definition share_options.hpp:1209
The SMB related properties for the file.
Definition rest_client.hpp:1060
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::SetProperties.
Definition share_options.hpp:1058
Client options used to initialize share clients.
Definition share_options.hpp:265
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::StartCopy.
Definition share_options.hpp:954
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::UploadFrom.
Definition share_options.hpp:1287
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::UploadRangeFromUri.
Definition share_options.hpp:1148
Optional parameters for Azure::Storage::Files::Shares::ShareFileClient::UploadRange.
Definition share_options.hpp:1105