Share via


IWatchKey.PollEvents Method

Definition

Retrieves and removes all pending events for this watch key, returning a List of the events that were retrieved.

[Android.Runtime.Register("pollEvents", "()Ljava/util/List;", "GetPollEventsHandler:Java.Nio.FileNio.IWatchKeyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public System.Collections.Generic.IList<Java.Nio.FileNio.IWatchEvent>? PollEvents ();
[<Android.Runtime.Register("pollEvents", "()Ljava/util/List;", "GetPollEventsHandler:Java.Nio.FileNio.IWatchKeyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member PollEvents : unit -> System.Collections.Generic.IList<Java.Nio.FileNio.IWatchEvent>

Returns

the list of the events retrieved; may be empty

Attributes

Remarks

Retrieves and removes all pending events for this watch key, returning a List of the events that were retrieved.

Note that this method does not wait if there are no events pending.

Java documentation for java.nio.file.WatchKey.pollEvents().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to