[Zope] total size of files in a folder

Marcus Bergmann zope@zope.org
Wed, 27 Feb 2002 12:57:49 +0100


Hi,

I want to get the total size of a folder. I do a loop over all files in
the folder, but it gives me only the size of the last file in the
folder:

<dtml-let total_size="0">
 <dtml-in "Files.objectValues()">	#Files is the name of my folder
  <dtml-let total_size="total_size+size">
   <dtml-if sequence-end>
    <dtml-var total_size>
   </dtml-if>
  </dtml-let>
 </dtml-in>
</dtml-let>

Alternatively, is there simply a variable I can lookup to get the size
of the folder?

Thank you,
Marcus