[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content - IFileContent.py:1.4 configure.zcml:1.3
Stephan Richter
srichter@cbu.edu
Fri, 20 Dec 2002 04:26:09 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content
In directory cvs.zope.org:/tmp/cvs-serv31450/Zope/App/OFS/Content
Modified Files:
IFileContent.py configure.zcml
Log Message:
Refactoring and fixing VFS and FTP
I am glad to make this commit that fixes up a lot of the FTP
implementation. I fixed the behavior of many of the FTP commands,
including LIST, SIZE, and CWD.
I moved the original VFSFile/DirectoryView into abstract classes and wrote
a special implementation for each content type, which makes the code much
more flexible.
Also I finally implemented a smart way of adding files via VFS through
file extension introspection, based on Jim's ExtensionViewName proposal.
I am adding documentation in the DevelCookbook right now and will later
add a README file.
TODOs:
- make VFS View names flexible, so that file extensions specify views.
- Simplify ZCML directives, so that one can add new extensions for Add views
quicker. A solution might look like that:
<vfs:view
name=".dtml"
for="Zope.App.OFS.Container.IAdding."
factory=".DTMLPageAdd."
permission="Zope.ManageContent">
<vfs:extension name=".html" />
<vfs:extension name=".xul" />
<vfs:extension name=".xml" />
...
</vfs:view>
This method would also be good for defining a default fiel extension.
- Show an object with its default file extension.
=== Zope3/lib/python/Zope/App/OFS/Content/IFileContent.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/OFS/Content/IFileContent.py:1.3 Fri Jul 19 09:12:30 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/IFileContent.py Fri Dec 20 04:25:38 2002
@@ -16,10 +16,15 @@
"""
from Interface import Interface
+
class IFileContent(Interface):
- """Marker interface for content that is managed as files
+ """Marker interface for content that can be managed as files.
The default view for file content has effective URLs that don't end in
/. In particular, if the content included HTML, relative links in
the HTML are relative to the container the content is in.
"""
+
+
+
+
=== Zope3/lib/python/Zope/App/OFS/Content/configure.zcml 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Content/configure.zcml:1.2 Wed Jul 10 20:03:18 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/configure.zcml Fri Dec 20 04:25:38 2002
@@ -1,6 +1,6 @@
<zopeConfigure
- xmlns='http://namespaces.zope.org/zope'
->
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:vfs="http://namespaces.zope.org/vfs">
<include package=".File" />
<include package=".Folder" />