ShareFileClient.Exists(CancellationToken) Method

Definition

The Exists(CancellationToken) operation can be called on a ShareFileClient to see if the associated file exists in the share on the storage account.

public virtual Azure.Response<bool> Exists (System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

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

Returns

Returns true if the file exists.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to