Class Event
source code
This class contains all the useful informations about the observed
event. However, the presence of each field is not guaranteed and depends
on the type of event. In effect, some fields are irrelevant for some kind
of event (for example 'cookie' is meaningless for IN_CREATE whereas it is
mandatory for IN_MOVE_TO).
The possible fields are:
-
wd (int): Watch Descriptor.
-
mask (int): Mask.
-
maskname (str): Readable event name.
-
path (str): path of the file or directory being watched.
-
name (str): Basename of the file or directory against which the event
was raised in case where the watched directory is the parent
directory. None if the event was raised on the watched item itself.
This field is always provided even if the string is ''.
-
pathname (str): Concatenation of 'path' and 'name'.
-
src_pathname (str): Only present for IN_MOVED_TO events and only in
the case where IN_MOVED_FROM events are watched too. Holds the source
pathname from where pathname was moved from.
-
cookie (int): Cookie.
-
dir (bool): True if the event was raised against a directory.
Concretely, this is the raw event plus inferred infos.
- Parameters:
dict_ - Set of attributes.
- Overrides:
_Event.__init__
|