Compartir a través de


DataLakeFileClient.CreateIfNotExists Método

Definición

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

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

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

Parámetros

options
DataLakePathCreateOptions

Parámetros opcionales.

cancellationToken
CancellationToken

Opcional CancellationToken para propagar las notificaciones que debe cancelarse la operación.

Devoluciones

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

Comentarios

RequestFailedException Se producirá una excepción si se produce un error.

Se aplica a