Share via


ShareDirectoryClient.CreateAsync Method

Definition

The CreateAsync(ShareDirectoryCreateOptions, CancellationToken) operation creates a new directory at the specified Uri.

For more information, see Create Directory.

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

Parameters

options
ShareDirectoryCreateOptions

Optional parameters.

cancellationToken
CancellationToken

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

Returns

A Response<T> describing the newly created directory.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to