# ``twisted`.`python`.`_inotify``

module documentation
(source)

Very low-level ctypes-based interface to Linux inotify(7).

ctypes and a version of libc which supports inotify system calls are required.

Class | `INotifyError` | Unify all the possible exceptions that can be raised by the INotify API.
Function | `add` | Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.
Function | `init` | Create an inotify instance and return the associated file descriptor.
Function | `initializeModule` | Initialize the module, checking if the expected APIs exist and setting the argtypes and restype for `inotify_init`, `inotify_add_watch`, and `inotify_rm_watch`.
Function | `remove` | Remove the given watch descriptor from the inotify file descriptor.
Variable | `libc` | Undocumented
Variable | `name` | Undocumented

def add(fd, path, mask): (source)
Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.

Parameters
fd:`int` | The file descriptor returned by `libc.inotify_init`.
path:`FilePath` | The path to watch via inotify.
mask:`int` | Bitmask specifying the events that inotify should monitor.
Returns
`int` | Undocumented

def init(): (source)
Create an inotify instance and return the associated file descriptor.

Returns
`int` | Undocumented

def initializeModule(libc): (source)
Initialize the module, checking if the expected APIs exist and setting the argtypes and restype for `inotify_init`, `inotify_add_watch`, and `inotify_rm_watch`.

Parameters
libc:`ctypes.CDLL` | Undocumented

def remove(fd, wd): (source)
Remove the given watch descriptor from the inotify file descriptor.

Parameters
fd:`int` | Undocumented
wd:`int` | Undocumented

libc = (source)

Undocumented

name = (source)

Undocumented