IFileSystemProvider.WatchFileAsync(Uri, 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.
Starts watching a file for changes. A DirectoryEntryChanged event occurs
when the file specified by uri
is created, deleted, or modified.
public:
System::Threading::Tasks::ValueTask<Microsoft::VisualStudio::RpcContracts::FileSystem::WatchResult ^> WatchFileAsync(Uri ^ uri, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.ValueTask<Microsoft.VisualStudio.RpcContracts.FileSystem.WatchResult> WatchFileAsync (Uri uri, System.Threading.CancellationToken cancellationToken);
abstract member WatchFileAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.VisualStudio.RpcContracts.FileSystem.WatchResult>
Public Function WatchFileAsync (uri As Uri, cancellationToken As CancellationToken) As ValueTask(Of WatchResult)
Parameters
- uri
- Uri
The file to be watched.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
An object which can be passed to UnwatchAsync(WatchResult, CancellationToken) to stop watching the file.
Exceptions
uri
is null.