![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
#include <gio.h> GDirectoryMonitor; gboolean g_directory_monitor_cancel (GDirectoryMonitor *monitor); gboolean g_directory_monitor_is_cancelled (GDirectoryMonitor *monitor); void g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor, int limit_msecs); void g_directory_monitor_emit_event (GDirectoryMonitor *monitor, GFile *child, GFile *other_file, GFileMonitorEvent event_type);
typedef struct _GDirectoryMonitor GDirectoryMonitor;
Implements a monitor on the given GFile that points to a directory.
gboolean g_directory_monitor_cancel (GDirectoryMonitor *monitor);
Cancels the monitoring activity on monitor
. Note that
the monitor is automatically cancelled when finalized.
It is safe to call this multiple times.
|
a GDirectoryMonitor. |
Returns : |
TRUE if the monitor was cancelled successfully. FALSE otherwise.
|
gboolean g_directory_monitor_is_cancelled (GDirectoryMonitor *monitor);
Checks whether monitor
is cancelled.
|
a GDirectoryMonitor. |
Returns : |
TRUE if the monitor on the directory was cancelled.
FALSE otherwise.
|
void g_directory_monitor_set_rate_limit (GDirectoryMonitor *monitor, int limit_msecs);
Report same consecutive changes of the same type at most once each limit_msecs
milliseconds.
|
a GDirectoryMonitor. |
|
the change rate limit of the directory monitor in milliseconds. |
void g_directory_monitor_emit_event (GDirectoryMonitor *monitor, GFile *child, GFile *other_file, GFileMonitorEvent event_type);
Emits the "changed" signal if a change has taken place. Should be called from directory monitor implementations only.
|
a GDirectoryMonitor. |
|
a GFile. |
|
a GFile. |
|
a set of GFileMonitorEvent flags. |
"cancelled"
property"cancelled" gboolean : Read
Whether the monitor has been cancelled.
Default value: FALSE
"changed"
signalvoid user_function (GDirectoryMonitor *monitor, GFile *child, GFile *other_file, gint event_type, gpointer user_data) : Run Last
Emitted when a child file changes.
|
the GDirectoryMonitor |
|
the GFile which changed |
|
the other GFile which changed |
|
a GFileMonitorEvent indicating what the event was |
|
user data set when the signal handler was connected. |