Monitoring

Name

Monitoring -- watch files for changes, and get called back if they do

Synopsis



GnomeVFSResult gnome_vfs_monitor_add        (GnomeVFSMonitorHandle **handle,
                                             const gchar *text_uri,
                                             GnomeVFSMonitorType monitor_type,
                                             GnomeVFSMonitorCallback callback,
                                             gpointer user_data);
GnomeVFSResult gnome_vfs_monitor_cancel     (GnomeVFSMonitorHandle *handle);
enum        GnomeVFSMonitorType;
enum        GnomeVFSMonitorEventType;
void        (*GnomeVFSMonitorCallback)      (GnomeVFSMonitorHandle *handle,
                                             const gchar *monitor_uri,
                                             const gchar *info_uri,
                                             GnomeVFSMonitorEventType event_type,
                                             gpointer user_data);

Description

Details

gnome_vfs_monitor_add ()

GnomeVFSResult gnome_vfs_monitor_add        (GnomeVFSMonitorHandle **handle,
                                             const gchar *text_uri,
                                             GnomeVFSMonitorType monitor_type,
                                             GnomeVFSMonitorCallback callback,
                                             gpointer user_data);

Watch the file or directory at text_uri for changes (or the creation/deletion of the file) and call callback when there is a change. If a directory monitor is added, callback is notified when any file in the directory changes.


gnome_vfs_monitor_cancel ()

GnomeVFSResult gnome_vfs_monitor_cancel     (GnomeVFSMonitorHandle *handle);

Cancel the monitor pointed to be handle.


enum GnomeVFSMonitorType

typedef enum {
  GNOME_VFS_MONITOR_FILE,
  GNOME_VFS_MONITOR_DIRECTORY
} GnomeVFSMonitorType;


enum GnomeVFSMonitorEventType

typedef enum {
  GNOME_VFS_MONITOR_EVENT_CHANGED,
  GNOME_VFS_MONITOR_EVENT_DELETED,
  GNOME_VFS_MONITOR_EVENT_STARTEXECUTING,
  GNOME_VFS_MONITOR_EVENT_STOPEXECUTING,
  GNOME_VFS_MONITOR_EVENT_CREATED,
  GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED
} GnomeVFSMonitorEventType;


GnomeVFSMonitorCallback ()

void        (*GnomeVFSMonitorCallback)      (GnomeVFSMonitorHandle *handle,
                                             const gchar *monitor_uri,
                                             const gchar *info_uri,
                                             GnomeVFSMonitorEventType event_type,
                                             gpointer user_data);

Function called when a monitor detects a change.