Module: InotifyEvents
- Defined in:
- lib/inotify.rb
Overview
Constants for each inotify event found in /usr/include/sys/inotify.h, descriptions from inotify man page (7), (note: When monitoring a directory, the events marked with an asterisk (*) above can occur for files in the directory, in which case the name field in the returned inotify_event structure identifies the name of the file within the directory.)
Constant Summary collapse
- IN_ACCESS =
File was accessed (read) (*).
0x00000001- IN_MODIFY =
File was modified (*).
0x00000002- IN_ATTRIB =
Metadata changed, e.g., permissions, timestamps, extended attributes, link count (since Linux 2.6.25), UID, GID, etc. (*).
0x00000004- IN_CLOSE_WRITE =
File opened for writing was closed (*).
0x00000008- IN_CLOSE_NOWRITE =
File not opened for writing was closed (*).
0x00000010- IN_CLOSE =
File was closed (*).
(IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)
- IN_OPEN =
File was opened (*).
0x00000020- IN_MOVED_FROM =
Generated for the directory containing the old filename when a file is renamed (*).
0x00000040- IN_MOVED_TO =
Generated for the directory containing the new filename when a file is renamed (*).
0x00000080- IN_MOVE =
Generated when a file is moved (*).
(IN_MOVED_FROM | IN_MOVED_TO)
- IN_CREATE =
File/directory created in watched directory (*).
0x00000100- IN_DELETE =
File/directory deleted from watched directory (*).
0x00000200- IN_DELETE_SELF =
Watched file/directory was itself deleted.
0x00000400- IN_MOVE_SELF =
Watched file/directory was itself moved.
0x00000800- IN_UNMOUNT =
Filesystem containing watched object was unmounted.
0x00002000- IN_Q_OVERFLOW =
Event queue overfloved.
0x00004000- IN_IGNORED =
Watch was removed explicitly (inotify_rm_watch(2)) or automatically (file was deleted, or filesystem was unmounted).
0x00008000- IN_ONLYDIR =
Only watch pathname if it is a directory.
0x01000000- IN_DONT_FOLLOW =
Don’t dereference pathname if it is a symbolic link.
0x02000000- IN_EXCL_UNLINK =
By default, when watching events on the children of a directory, events are generated for children even after they have been unlinked from the directory. This can result in large numbers of uninteresting events for some applications (e.g., if watching /tmp, in which many applications create temporary files whose names are immediately unlinked). Specifying IN_EXCL_UNLINK changes the default behavior, so that events are not generated for children after they have been unlinked from the watched directory.
0x04000000- IN_MASK_ADD =
Add (OR) events to watch mask for this pathname if it already exists (instead of replacing mask).
0x20000000- IN_ISDIR =
Subject of this event is a directory.
0x40000000- IN_ONESHOT =
Monitor pathname for one event, then remove from watch list.
0x80000000- IN_ALL_EVENTS =
Set all events.
(IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \ | IN_MOVED_TO | IN_CREATE | IN_DELETE \ | IN_DELETE_SELF | IN_MOVE_SELF)