Partilhar via


DataLakeFileSystemClient.CreateFileAsync Método

Definição

O CreateFileAsync(String, DataLakePathCreateOptions, CancellationToken) cria um arquivo neste sistema de arquivos. Se o arquivo já existir, ele será substituído. Se você não pretende substituir um arquivo existente, considere usar a CreateIfNotExistsAsync(DataLakePathCreateOptions, CancellationToken) API.

Para obter mais informações, 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.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

O caminho para o arquivo a ser criado.

options
DataLakePathCreateOptions

Parâmetros opcionais.

cancellationToken
CancellationToken

Opcional CancellationToken para propagar notificações de que a operação deve ser cancelada.

Retornos

Um Response<T> que descreve o diretório recém-criado.

Comentários

Um RequestFailedException será gerado se ocorrer uma falha.

Aplica-se a