PyinotifyHandler.PyinotifyHandler Class Reference

a handler for inotiy events More...

List of all members.

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


Detailed Description

a handler for inotiy events

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

Author:
Jorge

Member Function Documentation

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

Parameters:
path is added to watched
Author:
Jorge

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

See also:
Handler a notifier is created with the watched set and the handler
Author:
Jorge

def PyinotifyHandler.PyinotifyHandler.startNotifier (   self  ) 

Run the notifier in a separate thread.

Author:
Jorge

def PyinotifyHandler.PyinotifyHandler.stopNotifier (   self  ) 

stop the notifier

Author:
Jorge

def PyinotifyHandler.PyinotifyHandler.extractEvent (   self  ) 

extract the first event on the top of the queue

Returns:
the first event object on the queue if the queue is not empty, false otherwise
Author:
Jorge

def PyinotifyHandler.PyinotifyHandler.getPipe (   self  ) 

gets the pipe file descriptor to read the events contained on it

Returns:
__rfd the file descriptor to read from the pipe


Member Data Documentation

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


Generated on Wed Dec 19 19:25:04 2007 for HdLorean by  doxygen 1.5.4