Package org.gnome.gio

Class FileMonitor

java.lang.Object
All Implemented Interfaces:
Proxy
Direct Known Subclasses:
FileMonitor.FileMonitorImpl

@Generated("io.github.jwharm.JavaGI") public abstract class FileMonitor extends GObject
Monitors a file or directory for changes.

To obtain a GFileMonitor for a file or directory, use File.monitor(java.util.Set<org.gnome.gio.FileMonitorFlags>, org.gnome.gio.Cancellable), File.monitorFile(java.util.Set<org.gnome.gio.FileMonitorFlags>, org.gnome.gio.Cancellable), or File.monitorDirectory(java.util.Set<org.gnome.gio.FileMonitorFlags>, org.gnome.gio.Cancellable).

To get informed about changes to the file or directory you are monitoring, connect to the Gio.FileMonitor::changed signal. The signal will be emitted in the thread-default main context (see MainContext.pushThreadDefault()) of the thread that the monitor was created in (though if the global default main context is blocked, this may cause notifications to be blocked even if the thread-default context is still running).