[Zope3-checkins] CVS: Zope3/src/zope/fssync/server -
entryadapter.py:1.3
Philipp von Weitershausen
philikon at philikon.de
Tue Feb 24 11:51:27 EST 2004
Update of /cvs-repository/Zope3/src/zope/fssync/server
In directory cvs.zope.org:/tmp/cvs-serv27447/src/zope/fssync/server
Modified Files:
entryadapter.py
Log Message:
DirectoryAdapter has moved to zope.fssync.server.entryadapter. Also,
do not rely on the zope.app.file package for a test file object. Use
the already existing Sample class.
=== Zope3/src/zope/fssync/server/entryadapter.py 1.2 => 1.3 ===
--- Zope3/src/zope/fssync/server/entryadapter.py:1.2 Tue Jan 13 17:28:47 2004
+++ Zope3/src/zope/fssync/server/entryadapter.py Tue Feb 24 11:50:57 2004
@@ -17,7 +17,7 @@
"""
from zope.component import queryAdapter
-from zope.fssync.server.interfaces import IObjectFile
+from zope.fssync.server.interfaces import IObjectFile, IContentDirectory
from zope.interface import implements
from zope.proxy import removeAllProxies
from zope.xmlpickle import toxml
@@ -111,3 +111,14 @@
# if that's not the case, then either this method needs to be
# overridden or this class shouldn't be used.
return None
+
+class DirectoryAdapter(ObjectEntryAdapter):
+ """Folder adapter to provide a file-system representation.
+ """
+ implements(IContentDirectory)
+
+ def contents(self):
+ result = []
+ for name, object in self.context.items():
+ result.append((name, object))
+ return result
More information about the Zope3-Checkins
mailing list