diff options
author | Sebastien Martini <ookoi@mars.(none)> | 2008-06-30 18:26:28 +0200 |
---|---|---|
committer | Sebastien Martini <ookoi@mars.(none)> | 2008-06-30 18:26:28 +0200 |
commit | 4d09d5dc0625b00629eef1303ef550a0540664f9 (patch) | |
tree | 5afb39f8880025d3c045815aaca6e1213c95ed14 | |
parent | f1a48fe7fbb952204fba896319389d98da89df23 (diff) | |
download | pyinotify-4d09d5dc0625b00629eef1303ef550a0540664f9.tar.gz |
Documentation.
-rwxr-xr-x | pyinotify.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pyinotify.py b/pyinotify.py index 9d0a106..b66a1a8 100755 --- a/pyinotify.py +++ b/pyinotify.py @@ -1227,12 +1227,17 @@ class Watch: class ExcludeFilter: + """ + ExcludeFilter is an exclusion filter. + """ + def __init__(self, arg_lst): """ - arg_lst is either a list or dict. - [pattern1, ..., patternn] - {'filename1': (list1, listn), ...} where list1 is a list - of patterns + @param arg_lst: is either a list or dict of patterns: + [pattern1, ..., patternn] + {'filename1': (list1, listn), ...} where list1 is + a list of patterns + @type arg_lst: list or dict """ if isinstance(arg_lst, dict): lst = self._load_patterns(arg_lst) @@ -1258,6 +1263,13 @@ class ExcludeFilter: return regex.match(path) is not None def __call__(self, path): + """ + @param path: path to match against regexps. + @type path: str + @return: return True is path has been matched and should + be excluded, False otherwise. + @rtype: bool + """ for regex in self._lregex: if self._match(regex, path): return True |