Christoph Boget wrote on 26/01/2010 21:17:
I've looked through the docs but was unable to find out if this is possible; I hope it is. Is there a way that you get the size/length of the collection to be iterated (e.g. the total number of files) without having to iterate through at least once?
On Linux with safe mode off you can call system("du -hcs THE_DIR") to get the size of all files, no iterations needed.
Number of files could be a find command piped into wc -l, called from system(), like find . -name "*" | wc -l (but that would count dirs aswell)
-- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php