FileSystemAgentFileStore.FileExistsAsync(String, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether a file exists.
public override System.Threading.Tasks.Task<bool> FileExistsAsync(string path, System.Threading.CancellationToken cancellationToken = default);
override this.FileExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overrides Function FileExistsAsync (path As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- path
- String
The relative path of the file to check.
- cancellationToken
- CancellationToken
A token to cancel the operation.
Returns
true if the file exists; otherwise, false.