Public Member Functions | |
def | addToWatched |
adds a single path to __watched. | |
def | __init__ |
takes a list of paths and adds each one to watched. | |
def | startNotifier |
Run the notifier in a separate thread. | |
def | stopNotifier |
stop the notifier | |
def | extractEvent |
extract the first event on the top of the queue | |
def | getPipe |
gets the pipe file descriptor to read the events contained on it | |
Static Private Attributes | |
__watched = None | |
Contains paths and masks for watched resources. | |
__notifier = None | |
a threaded notifier of events | |
__dic = None | |
a dictionary, contains paths and internal descriptors | |
__handler = None | |
inhertis from pyinotify.ProcessEvent Contains functions to handle events | |
__blacklist = None | |
list of files/dirs that we don't want to monitorize | |
__reBlacklist = None | |
list of blacklisted patterns | |
__whitelist = None | |
list of files/dirs that we want to monitorize | |
int | __rfd = 0 |
file descriptor to read from the pipe | |
int | __wfd = 0 |
file descruptor to write on the pipe | |
__text = None | |
text for the GUI |
This module allows HD Lorean to watch events in the directory tree We obtain a whitelist and a blacklist of files from the module ConfigFileManager and use them to enqueue the events
def PyinotifyHandler.PyinotifyHandler.addToWatched | ( | self, | ||
path | ||||
) |
adds a single path to __watched.
checks if path exist and if it refers to file or directory then adds path to watched resources with the appropriate flags
path | is added to watched |
def PyinotifyHandler.PyinotifyHandler.__init__ | ( | self, | ||
text | ||||
) |
takes a list of paths and adds each one to watched.
An instance of ConfigFileManager is created to obtain the watched, white and reBlack sets The handler is initialized with those sets
def PyinotifyHandler.PyinotifyHandler.startNotifier | ( | self | ) |
Run the notifier in a separate thread.
def PyinotifyHandler.PyinotifyHandler.stopNotifier | ( | self | ) |
stop the notifier
def PyinotifyHandler.PyinotifyHandler.extractEvent | ( | self | ) |
extract the first event on the top of the queue
def PyinotifyHandler.PyinotifyHandler.getPipe | ( | self | ) |
gets the pipe file descriptor to read the events contained on it
PyinotifyHandler.PyinotifyHandler.__watched = None [static, private] |
Contains paths and masks for watched resources.
PyinotifyHandler.PyinotifyHandler.__notifier = None [static, private] |
a threaded notifier of events
PyinotifyHandler.PyinotifyHandler.__dic = None [static, private] |
a dictionary, contains paths and internal descriptors
PyinotifyHandler.PyinotifyHandler.__handler = None [static, private] |
inhertis from pyinotify.ProcessEvent Contains functions to handle events
PyinotifyHandler.PyinotifyHandler.__blacklist = None [static, private] |
list of files/dirs that we don't want to monitorize
PyinotifyHandler.PyinotifyHandler.__reBlacklist = None [static, private] |
list of blacklisted patterns
PyinotifyHandler.PyinotifyHandler.__whitelist = None [static, private] |
list of files/dirs that we want to monitorize
int PyinotifyHandler.PyinotifyHandler.__rfd = 0 [static, private] |
file descriptor to read from the pipe
int PyinotifyHandler.PyinotifyHandler.__wfd = 0 [static, private] |
file descruptor to write on the pipe
PyinotifyHandler.PyinotifyHandler.__text = None [static, private] |
text for the GUI