Condividi tramite


DataLakePathClient.Exists(CancellationToken) Method

Definition

The Exists(CancellationToken) operation can be called on a DataLakePathClient to see if the associated file or director exists in the file system.

public virtual Azure.Response<bool> Exists(System.Threading.CancellationToken cancellationToken = default);
abstract member Exists : System.Threading.CancellationToken -> Azure.Response<bool>
override this.Exists : System.Threading.CancellationToken -> Azure.Response<bool>
Public Overridable Function Exists (Optional cancellationToken As CancellationToken = Nothing) As Response(Of Boolean)

Parameters

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

Returns true if the file or directory exists.

Remarks

A RequestFailedException will be thrown if a failure occurs. If multiple failures occur, an AggregateException will be thrown, containing each failure instance. If you want to create the file system if it doesn't exist, use CreateIfNotExists(PathResourceType, DataLakePathCreateOptions, CancellationToken) instead.

Applies to