다음을 통해 공유


IWatchKey.Reset Method

Definition

Resets this watch key.

[Android.Runtime.Register("reset", "()Z", "GetResetHandler:Java.Nio.FileNio.IWatchKeyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public bool Reset ();
[<Android.Runtime.Register("reset", "()Z", "GetResetHandler:Java.Nio.FileNio.IWatchKeyInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Reset : unit -> bool

Returns

true if the watch key is valid and has been reset, and false if the watch key could not be reset because it is no longer #isValid valid

Attributes

Remarks

Resets this watch key.

If this watch key has been cancelled or this watch key is already in the ready state then invoking this method has no effect. Otherwise if there are pending events for the object then this watch key is immediately re-queued to the watch service. If there are no pending events then the watch key is put into the ready state and will remain in that state until an event is detected or the watch key is cancelled.

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

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