Share via


DataLakePathClient.CreateIfNotExists Método

Definição

A Azure.Storage.Files.DataLake.DataLakePathClient.CreateIfNotExists(Azure.Storage.Files.DataLake.Models.PathResourceType,Azure.Storage.Files.DataLake.Models.PathHttpHeaders,System.Collections.Generic.IDictionary{System.String,System.String},System.String,System.String,System.Threading.CancellationToken) operação cria um arquivo ou diretório. Se o arquivo ou diretório já existir, ele não será alterado.

Para obter mais informações, consulte 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.PathResourceType resourceType, Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateIfNotExists : Azure.Storage.Files.DataLake.Models.PathResourceType * Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
override this.CreateIfNotExists : Azure.Storage.Files.DataLake.Models.PathResourceType * Azure.Storage.Files.DataLake.Models.DataLakePathCreateOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.DataLake.Models.PathInfo>
Public Overridable Function CreateIfNotExists (resourceType As PathResourceType, Optional options As DataLakePathCreateOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of PathInfo)

Parâmetros

resourceType
PathResourceType

Tipo de recurso desse caminho – arquivo ou diretório.

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 caminho recém-criado.

Comentários

Um RequestFailedException será gerado se ocorrer uma falha.

Aplica-se a