Gio.FileMonitor
const Gio = imports.gi.Gio;
let fileMonitor = new Gio.FileMonitor({
context: value,
});
Monitors a file or directory for changes.
To obtain a Gio.FileMonitor for a file or directory, use Gio.File.prototype.monitor, Gio.File.prototype.monitor_file, or Gio.File.prototype.monitor_directory.
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][g-main-context-push-thread-default] 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).
Hierarchy
-
GObject.Object
- Gio.FileMonitor