[Zope-CVS] CVS: Products/Ape/lib/apelib/fs - interfaces.py:1.4.2.3 structure.py:1.7.2.3

Shane Hathaway shane at zope.com
Sat Feb 28 14:57:42 EST 2004


Update of /cvs-repository/Products/Ape/lib/apelib/fs
In directory cvs.zope.org:/tmp/cvs-serv29327/fs

Modified Files:
      Tag: ape-fs-oid-branch
	interfaces.py structure.py 
Log Message:
IFSReader: renamed assignNew to assignExisting and added getSubpath().


=== Products/Ape/lib/apelib/fs/interfaces.py 1.4.2.2 => 1.4.2.3 ===
--- Products/Ape/lib/apelib/fs/interfaces.py:1.4.2.2	Wed Feb 25 22:08:54 2004
+++ Products/Ape/lib/apelib/fs/interfaces.py	Sat Feb 28 14:57:42 2004
@@ -30,11 +30,12 @@
     """Filesystem reader that supports annotations.
     """
 
+    def getSubpath(oid):
+        """Returns the tuple path for an oid, relative to the base.
+        """
+
     def getPath(oid):
         """Returns the filesystem path for an oid.
-
-        May automatically append an extension if the file already
-        exists.
         """
 
     def readNodeType(oid):
@@ -72,8 +73,8 @@
         parent.
         """
 
-    def assignNew(oid, children):
-        """Assigns OIDs to newly found objects.
+    def assignExisting(oid, children):
+        """Assigns OIDs to previously existing objects on the filesystem.
 
         See readDirectory().  children is a list of (object_name, child_oid).
         """


=== Products/Ape/lib/apelib/fs/structure.py 1.7.2.2 => 1.7.2.3 ===
--- Products/Ape/lib/apelib/fs/structure.py:1.7.2.2	Wed Feb 25 22:08:54 2004
+++ Products/Ape/lib/apelib/fs/structure.py	Sat Feb 28 14:57:42 2004
@@ -93,15 +93,15 @@
             raise LoadError("Not a directory")
         data = list(c.readDirectory(event.oid))
         data.sort()
-        # Assign new OIDs.
+        # Assign OIDs to previously existing subobjects.
         assigned = {}
         for objname, child_oid in data:
             if child_oid is None:
                 child_oid = event.conf.oid_gen.new_oid(event, objname, True)
                 assigned[objname] = child_oid
         if assigned:
-            # Saw new objects.  Tell the connection what their OIDs are.
-            c.assignNew(event.oid, assigned.items())
+            # Saw existing objects.  Tell the connection what their OIDs are.
+            c.assignExisting(event.oid, assigned.items())
         # Return the results.
         res = []
         for objname, child_oid in data:




More information about the Zope-CVS mailing list