Sdílet prostřednictvím


IWatchEvent.Context Method

Definition

Returns the context for the event.

[Android.Runtime.Register("context", "()Ljava/lang/Object;", "GetContextHandler:Java.Nio.FileNio.IWatchEventInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)]
public Java.Lang.Object? Context ();
[<Android.Runtime.Register("context", "()Ljava/lang/Object;", "GetContextHandler:Java.Nio.FileNio.IWatchEventInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=26)>]
abstract member Context : unit -> Java.Lang.Object

Returns

the event context; may be null

Attributes

Remarks

Returns the context for the event.

In the case of StandardWatchEventKinds#ENTRY_CREATE ENTRY_CREATE, StandardWatchEventKinds#ENTRY_DELETE ENTRY_DELETE, and StandardWatchEventKinds#ENTRY_MODIFY ENTRY_MODIFY events the context is a Path that is the Path#relativize relative path between the directory registered with the watch service, and the entry that is created, deleted, or modified.

Java documentation for java.nio.file.WatchEvent.context().

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