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 init Create an inotify instance and return the associated file descriptor.
Function add Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.
Function remove Remove the given watch descriptor from the inotify 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.
def init(): (source)

Create an inotify instance and return the associated file descriptor.

def add(fd, path, mask): (source)

Add a watch for the given path to the inotify file descriptor, and return the watch descriptor.

ParametersfdThe file descriptor returned by libc.inotify_init. (type: int)
pathThe path to watch via inotify. (type: twisted.python.filepath.FilePath)
maskBitmask specifying the events that inotify should monitor. (type: int)
def remove(fd, wd): (source)

Remove the given watch descriptor from the inotify file descriptor.

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.

API Documentation for Twisted, generated by pydoctor at 2018-10-15 19:29:43.