ShareDirectoryClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A DirectoryClient represents a URI to the Azure Storage File service allowing you to manipulate a directory.
public class ShareDirectoryClient
type ShareDirectoryClient = class
Public Class ShareDirectoryClient
- Inheritance
-
ShareDirectoryClient
Constructors
ShareDirectoryClient() |
Initializes a new instance of the ShareDirectoryClient class for mocking. |
ShareDirectoryClient(String, String, String, ShareClientOptions) |
Initializes a new instance of the ShareDirectoryClient class. |
ShareDirectoryClient(String, String, String) |
Initializes a new instance of the ShareDirectoryClient class. |
ShareDirectoryClient(Uri, AzureSasCredential, ShareClientOptions) |
Initializes a new instance of the ShareDirectoryClient class. |
ShareDirectoryClient(Uri, ShareClientOptions) |
Initializes a new instance of the ShareDirectoryClient class. |
ShareDirectoryClient(Uri, StorageSharedKeyCredential, ShareClientOptions) |
Initializes a new instance of the ShareDirectoryClient class. |
ShareDirectoryClient(Uri, TokenCredential, ShareClientOptions) |
Initializes a new instance of the ShareDirectoryClient class. Note that ShareTokenIntent is currently required for token authentication. |
Properties
AccountName |
Gets the Storage account name corresponding to the directory client. |
CanGenerateSasUri |
Indicates whether the client is able to generate a SAS uri. Client can generate a SAS url if it is authenticated with a StorageSharedKeyCredential. |
Name |
Gets the name of the directory. |
Path |
Gets the path of the directory. |
ShareName |
Gets the share name corresponding to the directory client. |
Uri |
Gets the directory's primary Uri endpoint. |
Methods
Create(ShareDirectoryCreateOptions, CancellationToken) |
The Create(ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory at the specified Uri. For more information, see Create Directory. |
CreateAsync(ShareDirectoryCreateOptions, CancellationToken) |
The CreateAsync(ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory at the specified Uri. For more information, see Create Directory. |
CreateFile(String, Int64, ShareFileHttpHeaders, IDictionary<String,String>, FileSmbProperties, String, ShareFileRequestConditions, CancellationToken) |
Creates a new file or replaces an existing file. For more information, see Create File. |
CreateFileAsync(String, Int64, ShareFileHttpHeaders, IDictionary<String, String>, FileSmbProperties, String, ShareFileRequestConditions, CancellationToken) |
Creates a new file or replaces an existing file. For more information, see Create File. |
CreateIfNotExists(ShareDirectoryCreateOptions, CancellationToken) |
The CreateIfNotExistsAsync(ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory, if it does not already exists. If the directory already exists, it is not modified. For more information, see Create Directory. |
CreateIfNotExistsAsync(ShareDirectoryCreateOptions, CancellationToken) |
The CreateIfNotExistsAsync(ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory, if it does not already exists. If the directory already exists, it is not modified. For more information, see Create Directory. |
CreateSubdirectory(String, IDictionary<String,String>, FileSmbProperties, String, CancellationToken) |
The CreateSubdirectory(String, IDictionary<String,String>, FileSmbProperties, String, CancellationToken) operation creates a new subdirectory under this directory. For more information, see Create Directory. |
CreateSubdirectoryAsync(String, IDictionary<String,String>, FileSmbProperties, String, CancellationToken) |
The CreateSubdirectoryAsync(String, IDictionary<String,String>, FileSmbProperties, String, CancellationToken) operation creates a new subdirectory under this directory. For more information, see Create Directory. |
Delete(CancellationToken) |
The Delete(CancellationToken) operation removes the specified empty directory. For more information, see Delete Directory. |
DeleteAsync(CancellationToken) |
The DeleteAsync(CancellationToken) operation removes the specified empty directory. For more information, see Delete Directory. |
DeleteFile(String, ShareFileRequestConditions, CancellationToken) |
The DeleteFile(String, ShareFileRequestConditions, CancellationToken) operation immediately removes the file from the storage account. For more information, see Delete File. |
DeleteFileAsync(String, ShareFileRequestConditions, CancellationToken) |
The DeleteFile(String, ShareFileRequestConditions, CancellationToken) operation immediately removes the file from the storage account. For more information, see Delete File. |
DeleteIfExists(CancellationToken) |
The DeleteIfExists(CancellationToken) operation removes the specified empty directory, if it exists. For more information, see Delete Directory. |
DeleteIfExistsAsync(CancellationToken) |
The DeleteIfExistsAsync(CancellationToken) operation removes the specified empty directory, if it exists. For more information, see Delete Directory. |
DeleteSubdirectory(String, CancellationToken) |
The DeleteSubdirectory(String, CancellationToken) operation removes the specified empty subdirectory. For more information, see Delete Directory. |
DeleteSubdirectoryAsync(String, CancellationToken) |
The DeleteSubdirectoryAsync(String, CancellationToken) operation removes the specified empty subdirectory. For more information, see Delete Directory. |
Exists(CancellationToken) |
The Exists(CancellationToken) operation can be called on a ShareDirectoryClient to see if the associated directory exists in the share on the storage account in the storage service. |
ExistsAsync(CancellationToken) |
The Exists(CancellationToken) operation can be called on a ShareDirectoryClient to see if the associated directory exists in the share on the storage account in the storage service. |
ForceCloseAllHandles(Nullable<Boolean>, CancellationToken) |
The ForceCloseAllHandles(Nullable<Boolean>, CancellationToken) operation closes all handles opened on a directory or a file at the service. It optionally supports recursively closing handles on subresources when the resource is a directory. This API is intended to be used alongside GetHandles(Nullable<Boolean>, CancellationToken) to force close handles that block operations, such as renaming a directory. These handles may have leaked or been lost track of by SMB clients. The API has client-side impact on the handle being closed, including user visible errors due to failed attempts to read or write files. This API is not intended for use as a replacement or alternative for SMB close. For more information, see Force Close Handles. |
ForceCloseAllHandlesAsync(Nullable<Boolean>, CancellationToken) |
The ForceCloseAllHandlesAsync(Nullable<Boolean>, CancellationToken) operation closes all handles opened on a directory or a file at the service. It optionally supports recursively closing handles on subresources when the resource is a directory. This API is intended to be used alongside GetHandlesAsync(Nullable<Boolean>, CancellationToken) to force close handles that block operations, such as renaming a directory. These handles may have leaked or been lost track of by SMB clients. The API has client-side impact on the handle being closed, including user visible errors due to failed attempts to read or write files. This API is not intended for use as a replacement or alternative for SMB close. FFor more information, see Force Close Handles. |
ForceCloseHandle(String, CancellationToken) |
The ForceCloseHandle(String, CancellationToken) operation closes a handle opened on a directory
or a file at the service. It supports closing a single handle specified by This API is intended to be used alongside GetHandles(Nullable<Boolean>, CancellationToken) to force close handles that block operations, such as renaming a directory. These handles may have leaked or been lost track of by SMB clients. The API has client-side impact on the handle being closed, including user visible errors due to failed attempts to read or write files. This API is not intended for use as a replacement or alternative for SMB close. For more information, see Force Close Handles. |
ForceCloseHandleAsync(String, CancellationToken) |
The ForceCloseHandle(String, CancellationToken) operation closes a handle opened on a directory
or a file at the service. It supports closing a single handle specified by This API is intended to be used alongside GetHandlesAsync(Nullable<Boolean>, CancellationToken) to force close handles that block operations, such as renaming a directory. These handles may have leaked or been lost track of by SMB clients. The API has client-side impact on the handle being closed, including user visible errors due to failed attempts to read or write files. This API is not intended for use as a replacement or alternative for SMB close. For more information, see Force Close Handles. |
GenerateSasUri(ShareFileSasPermissions, DateTimeOffset) |
The GenerateSasUri(ShareFileSasPermissions, DateTimeOffset) returns a Uri that generates a Share Directory Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a service SAS. |
GenerateSasUri(ShareSasBuilder) |
The GenerateSasUri(ShareSasBuilder) returns a Uri that generates a Share Directory Service Shared Access Signature (SAS) Uri based on the Client properties and and builder. The SAS is signed by the shared key credential of the client. To check if the client is able to sign a Service Sas see CanGenerateSasUri. For more information, see Constructing a Service SAS. |
GetFileClient(String) |
Creates a new ShareFileClient object by appending
|
GetFilesAndDirectories(ShareDirectoryGetFilesAndDirectoriesOptions, CancellationToken) |
The GetFilesAndDirectoriesAsync(ShareDirectoryGetFilesAndDirectoriesOptions, CancellationToken) operation returns an async sequence of files and subdirectories in this directory. Enumerating the files and directories may make multiple requests to the service while fetching all the values. For more information, see List Directories and Files. |
GetFilesAndDirectories(String, CancellationToken) |
The GetFilesAndDirectories(String, CancellationToken) operation returns an async sequence of files and subdirectories in this directory. Enumerating the files and directories may make multiple requests to the service while fetching all the values. For more information, see List Directories and Files. |
GetFilesAndDirectoriesAsync(ShareDirectoryGetFilesAndDirectoriesOptions, CancellationToken) |
The GetFilesAndDirectoriesAsync(ShareDirectoryGetFilesAndDirectoriesOptions, CancellationToken) operation returns an async collection of files and subdirectories in this directory. Enumerating the files and directories may make multiple requests to the service while fetching all the values. For more information, see List Directories and Files. |
GetFilesAndDirectoriesAsync(String, CancellationToken) |
The GetFilesAndDirectoriesAsync(String, CancellationToken) operation returns an async collection of files and subdirectories in this directory. Enumerating the files and directories may make multiple requests to the service while fetching all the values. For more information, see List Directories and Files. |
GetHandles(Nullable<Boolean>, CancellationToken) |
The GetHandles(Nullable<Boolean>, CancellationToken) operation returns an async sequence of the open handles on a directory or a file. Enumerating the handles may make multiple requests to the service while fetching all the values. For more information, see List Handles. |
GetHandlesAsync(Nullable<Boolean>, CancellationToken) |
The GetHandlesAsync(Nullable<Boolean>, CancellationToken) operation returns an async sequence of the open handles on a directory or a file. Enumerating the handles may make multiple requests to the service while fetching all the values. For more information, see List Handles. |
GetParentDirectoryClientCore() |
Create a new ShareDirectoryClient that pointing to this ShareFileClient's parent container. The new ShareDirectoryClient uses the same request policy pipeline as the ShareFileClient. |
GetParentShareClientCore() |
Create a new ShareClient that pointing to this ShareFileClient's parent container. The new ShareClient uses the same request policy pipeline as the ShareFileClient. |
GetProperties(CancellationToken) |
The GetProperties(CancellationToken) operation returns all user-defined metadata and system properties for the specified directory. The data returned does not include the directory's list of subdirectories or files. For more information, see Get Directory Properties. |
GetPropertiesAsync(CancellationToken) |
The GetPropertiesAsync(CancellationToken) operation returns all user-defined metadata and system properties for the specified directory. The data returned does not include the directory's list of subdirectories or files. For more information, see Get Directory Properties. |
GetSubdirectoryClient(String) |
Creates a new ShareDirectoryClient object by appending
|
Rename(String, ShareFileRenameOptions, CancellationToken) |
Renames a directory. This API does not support renaming a directory from one share to another, or between storage accounts. |
RenameAsync(String, ShareFileRenameOptions, CancellationToken) |
Renames a directory. This API does not support renaming a directory from one share to another, or between storage accounts. |
SetHttpHeaders(ShareDirectorySetHttpHeadersOptions, CancellationToken) |
The SetHttpHeaders(ShareDirectorySetHttpHeadersOptions, CancellationToken) operation sets system properties on the directory. For more information, see Set Directory Properties. |
SetHttpHeadersAsync(ShareDirectorySetHttpHeadersOptions, CancellationToken) |
The SetHttpHeadersAsync(ShareDirectorySetHttpHeadersOptions, CancellationToken) operation sets system properties on the directory. For more information, see Set Directory Properties. |
SetMetadata(IDictionary<String,String>, CancellationToken) |
The SetMetadata(IDictionary<String,String>, CancellationToken) operation sets one or more user-defined name-value pairs for the specified directory. For more information, see Set Directory Metadata. |
SetMetadataAsync(IDictionary<String,String>, CancellationToken) |
The SetMetadataAsync(IDictionary<String,String>, CancellationToken) operation sets one or more user-defined name-value pairs for the specified directory. For more information, see Set Directory Metadata. |
WithSnapshot(String) |
Initializes a new instance of the ShareDirectoryClient
class with an identical Uri source but the specified
For more information, see Snapshot Share. |
Extension Methods
StartDownloadToDirectoryAsync(ShareDirectoryClient, String, ShareDirectoryClientTransferOptions) |
Downloads the contents of a share directory. |
StartUploadDirectoryAsync(ShareDirectoryClient, String, ShareDirectoryClientTransferOptions) |
Uploads the entire contents of local directory to the share directory. |
GetParentDirectoryClient(ShareDirectoryClient) |
Create a new ShareDirectoryClient that pointing to this ShareDirectoryClient's parent container. The new ShareDirectoryClient uses the same request policy pipeline as the ShareDirectoryClient. |
GetParentShareClient(ShareDirectoryClient) |
Create a new ShareClient that pointing to this ShareDirectoryClient's parent container. The new ShareClient uses the same request policy pipeline as the ShareDirectoryClient. |
Applies to
Azure SDK for .NET