[Zope] show filesize in LocalFS
Michael Bleijerveld
michael@bleijerveld.nl
Tue, 15 Jul 2003 22:37:07 +0200
Hi,
I tried <dtml-var size> but I get the same error.
Regards,
Michael
----- Original Message -----
From: "John Ziniti" <jziniti@speakeasy.org>
To: "Michael Bleijerveld" <michael@bleijerveld.nl>
Cc: <Zope@zope.org>
Sent: Tuesday, July 15, 2003 9:16 PM
Subject: Re: [Zope] show filesize in LocalFS
>
> ><dtml-in "admin.fileIds()">
> > <dtml-var sequence-item> <dtml-var "bobobase_modification_time()">
<dtml-var "get_size()">
> ></dtml-in>
> >
>
> "fileIds()" returns only a *list* of files in the directory,
> in this case "admin". What you want to use is
> <dtml-in "admin.fileObjects()">. But I still don't think
> that "get_size()" is a method of LocalFile objects. I
> think you should use <dtml-var size>, which indicates
> the size of the file in bytes, as returned by
> "os.stat(path)[stat.ST_SIZE]".
>
> HTH,
>
> JZ
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>