How do I get the size of an item ?
...anyone ? Say I have these folders: / /news /news/files What I need is, from a dtml method in /news, to get the size of an object (a file, say /news/files/file01.pdf) in /news/files. Thanks in advance, Dimitris
Dimitris Andrakakis wrote:
...anyone ?
Say I have these folders: / /news /news/files What I need is, from a dtml method in /news, to get the size of an object (a file, say /news/files/file01.pdf) in /news/files.
<dtml-with files> <dtml-var "_.get_size(_['file01.pdf'])"> </dtml-with> should do the trick. -- -mindlace- Zopatista Community Liason
ethan mindlace fremen <mindlace@digicool.com> wrote:
<dtml-with files> <dtml-var "_.get_size(_['file01.pdf'])"> </dtml-with>
Thanks ethan (& dieter too). I'm terribly sorry about requesting a receipt (I had the option on OE forgotten), it will not happen again. I have tried your suggestion, and indeed it works. Now, how does this work when the "file.pdf" is given as a DTML-VAR ? The situation is, I retrieve the file names from MySQL, so what I actually have is a <dtml-var "path[12:]">. "Path" is something like "06-01-2001/file.pdf". So I try this, but it won't work (it won't parse, actually). <dtml-with files> <dtml-var "_.get_size(_['<dtml-var "path[11:]">'])"> </dtml-with> I guess my question is actually about nested DTML, isn't it ? Dimitris http://atlas.central.ntua.gr:8000
participants (2)
-
Dimitris Andrakakis -
ethan mindlace fremen