Author: dmeyer
Date: Thu Apr 27 18:41:06 2006
New Revision: 1515
Modified:
trunk/beacon/src/inotify/__init__.py
Log:
add functions to get list of watches
Modified: trunk/beacon/src/inotify/__init__.py
==============================================================================
--- trunk/beacon/src/inotify/__init__.py (original)
+++ trunk/beacon/src/inotify/__init__.py Thu Apr 27 18:41:06 2006
@@ -79,6 +79,22 @@
return True
+ def has_watch(self, path):
+ """
+ Return if the given path is currently watched by the inotify
+ object.
+ """
+ path = os.path.realpath(path)
+ return path in self._watches_by_path
+
+
+ def get_watches(self):
+ """
+ Returns a list of all paths monitored by the object.
+ """
+ return self._watches_by_path.keys()
+
+
def _handle_data(self):
data = os.read(self._fd, 32768)
self._read_buffer += data
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog