Module pyinotify :: Class _SysProcessEvent
[hide private]
[frames] | no frames]

Class _SysProcessEvent

source code


There is three kind of processing according to each event:

  1. special handling (deletion from internal container, bug, ...).
  2. default treatment: which is applied to the majority of events.
  3. IN_ISDIR is never sent alone, he is piggybacked with a standard event, he is not processed as the others events, instead, its value is captured and appropriately aggregated to dst event.
Instance Methods [hide private]
 
__init__(self, wm, notifier)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
cleanup(self)
Cleanup (delete) old (>1mn) records contained in self._mv_cookie and self._mv.
source code
 
process_IN_CREATE(self, raw_event)
If the event affects a directory and the auto_add flag of the targetted watch is set to True, a new watch is added on this new directory, with the same attribute values than those of this watch.
source code
 
process_IN_MOVED_FROM(self, raw_event)
Map the cookie with the source path (+ date for cleaning).
source code
 
process_IN_MOVED_TO(self, raw_event)
Map the source path with the destination path (+ date for cleaning).
source code
 
process_IN_MOVE_SELF(self, raw_event)
STATUS: the following bug has been fixed in recent kernels (FIXME: which version ?).
source code
 
process_IN_Q_OVERFLOW(self, raw_event)
Only signal an overflow, most of the common flags are irrelevant for this event (path, wd, name).
source code
 
process_IN_IGNORED(self, raw_event)
The watch descriptor raised by this event is now ignored (forever), it can be safely deleted from the watch manager dictionary.
source code
 
process_default(self, raw_event, to_append=None)
Commons handling for the followings events:
source code

Inherited from _ProcessEvent: __call__, __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, wm, notifier)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • wm (WatchManager instance) - Watch Manager.
  • notifier (Notifier instance) - Notifier.
Overrides: object.__init__

process_IN_MOVE_SELF(self, raw_event)

source code 

STATUS: the following bug has been fixed in recent kernels (FIXME: which version ?). Now it raises IN_DELETE_SELF instead.

Old kernels were bugged, this event raised when the watched item were moved, so we had to update its path, but under some circumstances it was impossible: if its parent directory and its destination directory wasn't watched. The kernel (see include/linux/fsnotify.h) doesn't bring us enough informations like the destination path of moved items.

process_IN_IGNORED(self, raw_event)

source code 

The watch descriptor raised by this event is now ignored (forever), it can be safely deleted from the watch manager dictionary. After this event we can be sure that neither the event queue nor the system will raise an event associated to this wd again.

process_default(self, raw_event, to_append=None)

source code 

Commons handling for the followings events:

IN_ACCESS, IN_MODIFY, IN_ATTRIB, IN_CLOSE_WRITE, IN_CLOSE_NOWRITE, IN_OPEN, IN_DELETE, IN_DELETE_SELF, IN_UNMOUNT.