[Zope3-checkins] CVS: Zope3/src/zope/app/container - directory.py:1.2
Jim Fulton
jim@zope.com
Sun, 23 Mar 2003 08:45:00 -0500
Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv5981
Modified Files:
directory.py
Log Message:
Added doc strings.
=== Zope3/src/zope/app/container/directory.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/container/directory.py:1.1 Mon Feb 3 10:08:29 2003
+++ Zope3/src/zope/app/container/directory.py Sun Mar 23 08:44:59 2003
@@ -9,9 +9,17 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
-"""XXX short summary goes here.
+"""File-system representation adapters for containers
-XXX longer description goes here.
+This module includes tow adapters (adapter factories, really) for
+providing a file-system representation for containers:
+
+noop
+ Factory that "adapts" IContainer to IWriteDirectory.
+ This is a lie, since it just returns the original object.
+
+Cloner
+ An IDirectoryFactory adapter that just clones the original object.
$Id$
"""
@@ -21,9 +29,20 @@
from zope.proxy.introspection import removeAllProxies
def noop(container):
+ """XXX adapt an IContainer to an IWriteDirectory by just returning it
+
+ This "works" because IContainer and IWriteDirectory have the same
+ methods, however, the output doesn't actually imlement IWriteDirectory.
+ """
return container
class Cloner:
+ """IContainer to IDirectoryFactory adapter that clones
+
+ This adapter provides a factory that creates a new empty container
+ of the same class as it's context.
+
+ """
__implements__ = zope.app.interfaces.file.IDirectoryFactory