Provide operations for watching files and directories. Its internal
dictionary is used to reference watched items. When used inside threaded
code, one must instanciate as many WatchManager instances as there are
ThreadedNotifier instances.
|
__init__(self,
exclude_filter=<function <lambda> at 0x8e9e294>)
Initialization: init inotify, init watch manager dictionary. |
source code
|
|
int
|
|
|
|
|
|
|
__add_watch(self,
path,
mask,
proc_fun,
auto_add)
Add a watch on path, build a Watch object and insert it in the watch
manager dictionary. |
source code
|
|
|
|
dict of {str: int}
|
add_watch(self,
path,
mask,
proc_fun=None,
rec=False,
auto_add=False,
do_glob=False,
quiet=True,
exclude_filter=None)
Add watch(s) on the provided |path|(s) with associated |mask| flag
value and optionally with a processing |proc_fun| function and
recursive flag |rec| set to True. |
source code
|
|
list of int
|
__get_sub_rec(self,
lpath)
Get every wd from self._wmd if its path is under the path of one (at
least) of those in lpath. |
source code
|
|
dict of {int: bool}
|
update_watch(self,
wd,
mask=None,
proc_fun=None,
rec=False,
auto_add=False,
quiet=True)
Update existing watch descriptors |wd|. |
source code
|
|
list of type(param)
|
|
int or None
|
|
string or None
|
get_path(self,
wd)
Returns the path associated to WD, if WD is unknown it returns None. |
source code
|
|
string
|
|
dict of {int: bool}
|
|
Same as add_watch().
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|