[Zope3-checkins] CVS: Zope3/src/zope/app/content - configure.zcml:1.18 folder.py:1.12

Jim Fulton jim@zope.com
Tue, 27 May 2003 08:56:09 -0400


Update of /cvs-repository/Zope3/src/zope/app/content
In directory cvs.zope.org:/tmp/cvs-serv7502/src/zope/app/content

Modified Files:
	configure.zcml folder.py 
Log Message:
Added a separate IDirectoryFactory adapter for root folders so that
folders, rather than root folders get created when creating folders
via file-system-like (e.g. FTP, WebDAV, File-system sync) interfaces.


=== Zope3/src/zope/app/content/configure.zcml 1.17 => 1.18 ===
--- Zope3/src/zope/app/content/configure.zcml:1.17	Thu May 15 13:31:43 2003
+++ Zope3/src/zope/app/content/configure.zcml	Tue May 27 08:56:08 2003
@@ -49,6 +49,13 @@
    />
 
 <adapter
+   for="zope.app.interfaces.content.folder.IRootFolder"
+   provides="zope.app.interfaces.file.IDirectoryFactory"
+   factory="zope.app.content.folder.RootDirectoryFactory"
+   permission="zope.ManageContent"
+   />
+
+<adapter
    for="zope.app.interfaces.content.folder.IFolder"
    provides="zope.app.interfaces.file.IFileFactory"
    factory="zope.app.content.image.FileFactory"


=== Zope3/src/zope/app/content/folder.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/content/folder.py:1.11	Thu May  1 15:35:10 2003
+++ Zope3/src/zope/app/content/folder.py	Tue May 27 08:56:08 2003
@@ -110,6 +110,13 @@
     __implements__ = Folder.__implements__, IRootFolder
 
 
+class RootDirectoryFactory:
+    def __init__(self, context):
+        pass
+
+    def __call__(self, name):
+        return Folder()
+
 # Adapter to provide a file-system rendition of folders
 
 class ReadDirectory: