gio + inotify support for hard links

Add a new GFileMonitorFlag: G_FILE_MONITOR_WATCH_HARD_LINKS.  When set,
changes made to the file via another hard link will be detected.

Implement the new flag for the inotify backend.

https://bugzilla.gnome.org/show_bug.cgi?id=532815
This commit is contained in:
Ryan Lortie
2009-11-18 17:59:14 -06:00
committed by Dan Winship
parent e6d45972fc
commit 707bc4a40f
9 changed files with 328 additions and 67 deletions

View File

@@ -308,13 +308,16 @@ typedef enum {
* event instead (NB: not supported on all backends; the default
* behaviour -without specifying this flag- is to send single DELETED
* and CREATED events).
* @G_FILE_MONITOR_WATCH_HARD_LINKS: Watch for changes to the file made
* via another hard link.
*
* Flags used to set what a #GFileMonitor will watch for.
*/
typedef enum {
G_FILE_MONITOR_NONE = 0,
G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0),
G_FILE_MONITOR_SEND_MOVED = (1 << 1)
G_FILE_MONITOR_NONE = 0,
G_FILE_MONITOR_WATCH_MOUNTS = (1 << 0),
G_FILE_MONITOR_SEND_MOVED = (1 << 1),
G_FILE_MONITOR_WATCH_HARD_LINKS = (1 << 2)
} GFileMonitorFlags;