Compartir a través de


DataLakeFileSystemClient.CreateFileAsync Método

Definición

CreateFileAsync(String, DataLakePathCreateOptions, CancellationToken) crea un archivo en este sistema de archivos. Si el archivo ya existe, se sobrescribirá. Si no intenta sobrescribir un archivo existente, considere la posibilidad de usar la CreateIfNotExistsAsync(DataLakePathCreateOptions, CancellationToken) API.

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

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

Parámetros

path
String

Ruta de acceso al archivo que se va a crear.

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 directorio recién creado.

Comentarios

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

Se aplica a