Freigeben über


FileObserver Constructors

Definition

Overloads

FileObserver(File)

Equivalent to FileObserver(file, FileObserver.

FileObserver(IList<File>)

Equivalent to FileObserver(paths, FileObserver.

FileObserver(String)

Equivalent to FileObserver(path, FileObserver.

FileObserver(File, FileObserverEvents)

Create a new file observer for a certain file or directory.

FileObserver(IList<File>, FileObserverEvents)

Version of #FileObserver(File, int) that allows callers to monitor multiple files or directories.

FileObserver(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

FileObserver(String, FileObserverEvents)

Create a new file observer for a certain file or directory.

FileObserver(File)

Equivalent to FileObserver(file, FileObserver.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "", ApiSince=29)]
public FileObserver (Java.IO.File file);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;)V", "", ApiSince=29)>]
new Android.OS.FileObserver : Java.IO.File -> Android.OS.FileObserver

Parameters

file
File
Attributes

Remarks

Equivalent to FileObserver(file, FileObserver.ALL_EVENTS).

Java documentation for android.os.FileObserver.FileObserver(java.io.File).

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

FileObserver(IList<File>)

Equivalent to FileObserver(paths, FileObserver.

[Android.Runtime.Register(".ctor", "(Ljava/util/List;)V", "", ApiSince=29)]
public FileObserver (System.Collections.Generic.IList<Java.IO.File> files);
[<Android.Runtime.Register(".ctor", "(Ljava/util/List;)V", "", ApiSince=29)>]
new Android.OS.FileObserver : System.Collections.Generic.IList<Java.IO.File> -> Android.OS.FileObserver

Parameters

files
IList<File>

The files or directories to monitor

Attributes

Remarks

Equivalent to FileObserver(paths, FileObserver.ALL_EVENTS).

Java documentation for android.os.FileObserver.FileObserver(java.util.List<java.io.File>).

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

FileObserver(String)

Equivalent to FileObserver(path, FileObserver.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public FileObserver (string? path);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Android.OS.FileObserver : string -> Android.OS.FileObserver

Parameters

path
String
Attributes

Remarks

Equivalent to FileObserver(path, FileObserver.ALL_EVENTS).

This member is deprecated. use #FileObserver(File) instead.

Java documentation for android.os.FileObserver.FileObserver(java.lang.String).

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

FileObserver(File, FileObserverEvents)

Create a new file observer for a certain file or directory.

[Android.Runtime.Register(".ctor", "(Ljava/io/File;I)V", "", ApiSince=29)]
public FileObserver (Java.IO.File file, Android.OS.FileObserverEvents mask);
[<Android.Runtime.Register(".ctor", "(Ljava/io/File;I)V", "", ApiSince=29)>]
new Android.OS.FileObserver : Java.IO.File * Android.OS.FileObserverEvents -> Android.OS.FileObserver

Parameters

file
File

The file or directory to monitor

mask
FileObserverEvents

The event or events (added together) to watch for

Attributes

Remarks

Create a new file observer for a certain file or directory. Monitoring does not start on creation! You must call #startWatching() before you will receive events.

Java documentation for android.os.FileObserver.FileObserver(java.io.File, int).

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

FileObserver(IList<File>, FileObserverEvents)

Version of #FileObserver(File, int) that allows callers to monitor multiple files or directories.

[Android.Runtime.Register(".ctor", "(Ljava/util/List;I)V", "", ApiSince=29)]
public FileObserver (System.Collections.Generic.IList<Java.IO.File> files, Android.OS.FileObserverEvents mask);
[<Android.Runtime.Register(".ctor", "(Ljava/util/List;I)V", "", ApiSince=29)>]
new Android.OS.FileObserver : System.Collections.Generic.IList<Java.IO.File> * Android.OS.FileObserverEvents -> Android.OS.FileObserver

Parameters

files
IList<File>

The files or directories to monitor

mask
FileObserverEvents

The event or events (added together) to watch for

Attributes

Remarks

Version of #FileObserver(File, int) that allows callers to monitor multiple files or directories.

Java documentation for android.os.FileObserver.FileObserver(java.util.List<java.io.File>, int).

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

FileObserver(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected FileObserver (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.OS.FileObserver : nativeint * Android.Runtime.JniHandleOwnership -> Android.OS.FileObserver

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

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

FileObserver(String, FileObserverEvents)

Create a new file observer for a certain file or directory.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "")]
public FileObserver (string? path, Android.OS.FileObserverEvents mask);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "")>]
new Android.OS.FileObserver : string * Android.OS.FileObserverEvents -> Android.OS.FileObserver

Parameters

path
String

The file or directory to monitor

mask
FileObserverEvents

The event or events (added together) to watch for

Attributes

Remarks

Create a new file observer for a certain file or directory. Monitoring does not start on creation! You must call #startWatching() before you will receive events.

This member is deprecated. use #FileObserver(File, int) instead.

Java documentation for android.os.FileObserver.FileObserver(java.lang.String, int).

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