Share via


ShareClient.CreateDirectoryAsync Method

Definition

The CreateDirectoryAsync(String, ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory in this share.

For more information, see Create Directory.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.ShareDirectoryClient>> CreateDirectoryAsync (string directoryName, Azure.Storage.Files.Shares.Models.ShareDirectoryCreateOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateDirectoryAsync : string * Azure.Storage.Files.Shares.Models.ShareDirectoryCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.ShareDirectoryClient>>
override this.CreateDirectoryAsync : string * Azure.Storage.Files.Shares.Models.ShareDirectoryCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.ShareDirectoryClient>>
Public Overridable Function CreateDirectoryAsync (directoryName As String, Optional options As ShareDirectoryCreateOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareDirectoryClient))

Parameters

directoryName
String

The name of the directory to create.

options
ShareDirectoryCreateOptions

Optional parameters.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> referencing the newly created directory.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to