gio.file_monitor
Module for [FileMonitor] class
Types 3
Monitors a file or directory for changes.
To obtain a gio.file_monitor.FileMonitor for a file or directory, use gio.file.File.monitor, gio.file.File.monitorFile, or gio.file.File.monitorDirectory.
To get informed about changes to the file or directory you are monitoring, connect to the gio.file_monitor.FileMonitor.changed signal. The signal will be emitted in the thread-default main context (see glib.main_context.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).
FileMonitorGidBuilder builder() static nothrowGet builder for [gio.file_monitor.FileMonitor] Returns: New builder objectbool cancelled() @property nothrowGet `cancelled` property. Returns: Whether the monitor has been cancelled.int rateLimit() @property nothrowGet `rateLimit` property. Returns: The limit of the monitor to watch for changes, in milliseconds.void rateLimit(int propval) @property nothrowSet `rateLimit` property. Params: propval = The limit of the monitor to watch for changes, in milliseconds.void emitEvent(gio.file.File child, gio.file.File otherFile, gio.types.FileMonitorEvent eventType) nothrowEmits the #GFileMonitor::changed signal if a change has taken place. Should be called from file monitor implementations only.bool isCancelled() nothrowReturns whether the monitor is canceled. Returns: true if monitor is canceled. false otherwise.void setRateLimit(int limitMsecs) nothrowSets the rate limit to which the monitor will report consecutive change events to the same file.gulong connectChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.file.File)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.file.File)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] == gio.types.FileMonitorEvent)))
&& (Parameters!T.length < 4 || (ParameterStorageClassTuple!T[3] == ParameterStorageClass.none && is(Parameters!T[3] : gio.file_monitor.FileMonitor)))
&& Parameters!T.length < 5) nothrowConnect to `Changed` signal.Fluent builder implementation template for gio.file_monitor.FileMonitor
T rateLimit(int propval) nothrowSet `rateLimit` property. Params: propval = The limit of the monitor to watch for changes, in milliseconds. Returns: Builder instance for fluent chainingFluent builder for gio.file_monitor.FileMonitor