Commit 5eeb620a authored by Stephan Richter's avatar Stephan Richter

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.
parent e2d477c7
......@@ -9,7 +9,7 @@ pdf: zconfig.pdf
ps: zconfig.ps
zconfig.pdf: zconfig.tex
mkhowto --pdf $<
/home/srichter/Python/python-head/dist/src/Doc/tools/mkhowto --pdf $<
zconfig.ps: zconfig.tex
mkhowto --postscript $<
/home/srichter/Python/python-head/dist/src/Doc/tools/mkhowto --postscript $<
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment