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 most of events.
  1. IN_ISDIR is never sent alone, he is piggybacked with a standart 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 x.__class__.__doc__ 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 concerns 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 attributes's 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 the recent kernels (fixme: which version ?).
source code
 
process_IN_Q_OVERFLOW(self, raw_event)
Only signal 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 watch manager dictionary.
source code
 
process_default(self, raw_event, to_append={})
Common handling for the following 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 x.__class__.__doc__ for signature

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

process_IN_MOVE_SELF(self, raw_event)

source code 

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

Old kernels are bugged, this event is raised when the watched item was moved, so we must update its path, but under some circumstances it can be impossible: if its parent directory and its destination directory aren'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 watch manager dictionary. After this event we can be sure that neither the event queue neither the system will raise an event associated to this wd.

process_default(self, raw_event, to_append={})

source code 

Common handling for the following events:

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