[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/VFS - VFSContainerView.py:1.5
Stephan Richter
srichter@cbu.edu
Mon, 23 Dec 2002 03:16:07 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/VFS
In directory cvs.zope.org:/tmp/cvs-serv26132/Zope/App/OFS/Container/Views/VFS
Modified Files:
VFSContainerView.py
Log Message:
Implemented VFS views for the Local Service Manager. You can now traverse
into it up to Packages.
Since Jim did not tell me what he wanted to do in a Package, I did not
add much there, so that all Services are shown as directories now. The
only binding I implemented was for the ZPTTemplate, which works fine so
that you can add ZPTs via VFS now. I could imagine doing the same for
Module, but other than that Package is rather boring from a VFS point of
view.
Of course we could do some "magic" and display a text (file content)
representation of the various services, but I do not know how useful this
would be.
=== Zope3/lib/python/Zope/App/OFS/Container/Views/VFS/VFSContainerView.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/VFS/VFSContainerView.py:1.4 Fri Dec 20 04:25:37 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/VFS/VFSContainerView.py Mon Dec 23 03:15:35 2002
@@ -54,8 +54,8 @@
try:
self.publishTraverse(self.request, name)
except NotFound:
- return 0
- return 1
+ return False
+ return True
def listdir(self, with_stats=0, pattern='*'):
'See Zope.Publisher.VFS.IVFSDirectoryPublisher.IVFSDirectoryPublisher'
@@ -160,6 +160,9 @@
created = zerotime
modified = zerotime
+ # Sometimes this value is not set, but we need to return a datetime
+ if created is None:
+ created = zerotime
# It happens that modified might still be None, so make sure we return
# a date. *nix then uses the created date as the modified one, which we
# do too. ;)