[Zope3-checkins] CVS: Zope3/src/zope/app/container - directory.py:1.1 configure.zcml:1.6
Jim Fulton
jim@zope.com
Mon, 3 Feb 2003 10:09:32 -0500
Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv15846/src/zope/app/container
Modified Files:
configure.zcml
Added Files:
directory.py
Log Message:
Refactored the ftp framework to make it much simpler, less general,
and easier to maintain. This included ripping out the vfs framework.
=== Added File Zope3/src/zope/app/container/directory.py ===
##############################################################################
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""XXX short summary goes here.
XXX longer description goes here.
$Id: directory.py,v 1.1 2003/02/03 15:08:29 jim Exp $
"""
__metaclass__ = type
import zope.app.interfaces.file
from zope.proxy.introspection import removeAllProxies
def noop(container):
return container
class Cloner:
__implements__ = zope.app.interfaces.file.IDirectoryFactory
def __init__(self, context):
self.context = context
def __call__(self, name):
# We remove all of the proxies so we can actually
# call the class. This should be OK as we are only
# calling this for objects that get this adapter.
return removeAllProxies(self.context).__class__()
=== Zope3/src/zope/app/container/configure.zcml 1.5 => 1.6 ===
--- Zope3/src/zope/app/container/configure.zcml:1.5 Mon Dec 30 18:50:29 2002
+++ Zope3/src/zope/app/container/configure.zcml Mon Feb 3 10:08:29 2003
@@ -12,6 +12,18 @@
factory="zope.app.container.find.FindAdapter"
/>
+ <adapter
+ for="zope.app.interfaces.container.IReadContainer"
+ provides="zope.app.interfaces.file.IReadDirectory"
+ factory=".directory.noop"
+ />
+
+ <adapter
+ for="zope.app.interfaces.container.IWriteContainer"
+ provides="zope.app.interfaces.file.IWriteDirectory"
+ factory=".directory.noop"
+ />
+
<browser:page
name="_traverse"
for="zope.app.interfaces.container.IItemContainer"