[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Getting File size
Kevin Walsh wrote:
....
> > Thank you a lot! But I think
> >
> > if($opt->{size}) {
> > return $stat[7];
> > }
> >
> > should be as
> >
> > if($opt->{size}) {
> > return $stat[7] < 1024
> > ? $stat[7]
> > : ( $stat[7] < 1024 * 1024
> > ? sprintf ("%.2fK", $stat[7] / 1024)
> > : sprintf ("%.2fM", $stat[7] / 1024 / 1024)
> > );
> > }
> >
> > to get the file size with K or M. What do you think?
> >
> The tag could be modified to do that, but I think its probably
> better that you do it yourself with a [calc].
Why? Give me the light in my head to follow you!
Thanks!
Joachim
--
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de