OneDriveConnector.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 if a file exists at the specified path in OneDrive.
public System.Threading.Tasks.Task<bool> FileExistsAsync(string filePath, System.Threading.CancellationToken cancellationToken = default);
member this.FileExistsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function FileExistsAsync (filePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- filePath
- String
The path to the file in OneDrive.
- cancellationToken
- CancellationToken
An optional CancellationToken to observe while waiting for the task to complete.
Returns
A Task<TResult> representing the result of the asynchronous operation. True if the file exists, false otherwise.