Expand description
Raw inotify helpers.
This module provides low-level interaction with the Linux inotify subsystem.
It handles the initialization of watches, reading of raw events, and
decoding of the packed event stream.
Higher-level modules should use these primitives to monitor configuration files, log directories, or process markers. The API stays close to kernel behavior and does only minimal decoding.
Structs§
- Inotify
Event - A decoded inotify event header.
Constants§
- DELETE_
SELF_ MASK - Watched file/directory was deleted.
- IGNORED_
MASK - Watch was removed (explicitly or because file was deleted).
- MODIFY_
MASK - File was modified.
- MOVE_
SELF_ MASK - Watched file/directory was moved.
- PACKAGE_
FILE_ MASK - Mask for monitoring package file state changes.
- PARENT_
WATCH_ MASK - Mask for monitoring parent directories that may create, replace, or remove a watched file.
- QUEUE_
OVERFLOW_ MASK - Inotify event queue overflowed.
- UNMOUNT_
MASK - Filesystem containing watched object was unmounted.
Functions§
- add_
watch - Add a watch to an existing inotify instance.
- decode_
events - Decode packed inotify events from a raw byte buffer.
- init
- Create a non-blocking close-on-exec inotify file descriptor.
- read_
events - Read all available inotify events from the descriptor.
- remove_
watch - Remove an existing watch descriptor from an inotify instance.