[Zope] LocalFS

Dieter Maurer dieter@handshake.de
Sun, 28 May 2000 23:32:52 +0200


Dear Jonothan,

thank you for LocalFS!

If you had not created it, I would have done it.
However, I must admit, mine would not have been as nice as yours.


I have attached a small patch that allows "Local File System"
and its content to be cataloged. There are still some open issues
I want to discuss in "zope-dev":
  1. the addional meta types ("Local Directory" and "Local File")
     which cannot be added as objects but should, maybe, cataloged.
  2. "bobobase_modification_time", which is not completely
     adaquate for cataloging local files.


Dieter

*************************************************************************
--- lib/python/Products/LocalFS/:LocalFS.py	Fri Apr 14 06:36:06 2000
+++ lib/python/Products/LocalFS/LocalFS.py	Sun May 28 22:12:40 2000
@@ -825,6 +825,15 @@
     # deprecated methods, for backward compatibility
     objectIds = fileIds
     objectProps = fileValues
+
+    # to make LocalDirectory findable and catalogable
+    def objectItems(self):
+      # should we add a docstring? -- for webdav/XML-RPC
+      r= []
+      for i in self.fileIds():
+	try: r.append((i,self[i]))
+	except KeyError: pass
+      return r
     
     def tpValues(self):
         """Returns a list of the folder's sub-folders, used by tree tag."""