Compartir a través de


DataLakeFileClient.CreateIfNotExistsAsync Método

Definición

La CreateIfNotExistsAsync(DataLakePathCreateOptions, CancellationToken) operación crea un archivo. Si el archivo ya existe, no se cambia.

Para más información, consulte https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>> CreateIfNotExistsAsync (Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions options = default, System.Threading.CancellationToken cancellationToken = default);
override this.CreateIfNotExistsAsync : Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>>
Public Overridable Function CreateIfNotExistsAsync (Optional options As DataLakePathCreateOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of PathInfo))

Parámetros

options
DataLakePathCreateOptions

Parámetros opcionales.

cancellationToken
CancellationToken

Opcional CancellationToken para propagar notificaciones que se deben cancelar en la operación.

Devoluciones

que Response<T> describe el archivo recién creado.

Comentarios

RequestFailedException Se producirá un error si se produce un error.

Se aplica a