[CalendarServer-changes] [256] CalendarServer/trunk/twistedcaldav/static.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Oct 5 16:52:09 PDT 2006


Revision: 256
          http://trac.macosforge.org/projects/calendarserver/changeset/256
Author:   wsanchez at apple.com
Date:     2006-10-05 16:52:09 -0700 (Thu, 05 Oct 2006)

Log Message:
-----------
Implement createSimilarFile() for DAVFile subclasses that change args of __init__()

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/static.py

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2006-10-05 19:50:05 UTC (rev 255)
+++ CalendarServer/trunk/twistedcaldav/static.py	2006-10-05 23:52:09 UTC (rev 256)
@@ -599,6 +599,9 @@
             if not child_fp.exists(): child_fp.makedirs()
             self.putChild(name, clazz(child_fp.path))
 
+    def createSimilarFile(self, path):
+        return self.__class__(path)
+
     def locateChild(self, request, segments):
         return locateExistingChild(self, request, segments)
 
@@ -644,6 +647,9 @@
         """
         super(CalendarHomeProvisioningFile, self).__init__(path)
 
+    def createSimilarFile(self, path):
+        return self.__class__(path)
+
     def hasChild(self, name):
         """
         @return: C{True} if this resource has a child with the given name,
@@ -864,6 +870,9 @@
         CalendarPrincipalCollectionResource.__init__(self, url)
         DAVFile.__init__(self, path)
 
+    def createSimilarFile(self, path):
+        return self.__class__(path, self.principalCollectionURL())
+
     def initialize(self, homeuri, home):
         """
         May be called during repository account initialization.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061005/64a5246e/attachment.html


More information about the calendarserver-changes mailing list