Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CloudFileShare.CreateIfNotExistsAsync 方法

定义

重载

CreateIfNotExistsAsync()

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

CreateIfNotExistsAsync(CancellationToken)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

CreateIfNotExistsAsync(FileRequestOptions, OperationContext)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

CreateIfNotExistsAsync(FileRequestOptions, OperationContext, CancellationToken)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

CreateIfNotExistsAsync()

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync ();
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member CreateIfNotExistsAsync : unit -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : unit -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync () As Task(Of Boolean)

返回

一个表示当前操作的 Task<TResult> 对象。

属性

注解

此 API 需要“创建”或“写入”权限。

适用于

CreateIfNotExistsAsync(CancellationToken)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member CreateIfNotExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (cancellationToken As CancellationToken) As Task(Of Boolean)

参数

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

一个表示当前操作的 Task<TResult> 对象。

属性

注解

此 API 需要“创建”或“写入”权限。

适用于

CreateIfNotExistsAsync(FileRequestOptions, OperationContext)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (options As FileRequestOptions, operationContext As OperationContext) As Task(Of Boolean)

参数

options
FileRequestOptions

一个 FileRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

返回

一个表示当前操作的 Task<TResult> 对象。

属性

注解

此 API 需要“创建”或“写入”权限。

适用于

CreateIfNotExistsAsync(FileRequestOptions, OperationContext, CancellationToken)

返回一个任务,该任务执行异步请求以创建共享(如果尚不存在)。

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<bool> CreateIfNotExistsAsync (Microsoft.Azure.Storage.File.FileRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member CreateIfNotExistsAsync : Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.CreateIfNotExistsAsync : Microsoft.Azure.Storage.File.FileRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function CreateIfNotExistsAsync (options As FileRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of Boolean)

参数

options
FileRequestOptions

一个 FileRequestOptions 对象,它指定请求的其他选项。

operationContext
OperationContext

一个 OperationContext 对象,它一个表示当前操作的上下文。

cancellationToken
CancellationToken

等待任务完成期间要观察的 CancellationToken

返回

一个表示当前操作的 Task<TResult> 对象。

属性

注解

此 API 需要“创建”或“写入”权限。

适用于