[Zope] get size of file in localfs

Chris Withers chrisw@nipltd.com
Fri, 18 Jul 2003 15:35:11 +0100


Michael Bleijerveld wrote:
> file = container.REQUEST.form['FILE']
> filesize = len(file.read())
> When getting the size of large files it takes a long time to calculate.
>  
> Is there another (fast) way to get the filesize in a python script ?

What do you need to know the length of the file for?

cheers,

Chris