Re: Getting Dir Size?

From: Date: Mon, 08 Jan 2001 21:17:00 +0000
Subject: Re: Getting Dir Size?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33314@lists.php.net to get a copy of this message
Cycle through directory, use filesize() on each file, add it together. Key references : http://www.php.net/manual/function.readdir.php http://www.php.net/manual/function.is-file.php http://www.php.net/manual/function.filesize.php I think that's how I'd do it. Regarding returning bytes, kb, etc. there are examples in user comments within filesize() man entry. If you mean not add them together then don't ;) Within readdir() man entry are examples to read the directory (loop through it). Consider foreach (or while). http://www.php.net/manual/control-structures.foreach.php Regards, Philip be outside the box. On Mon, 8 Jan 2001, Chris Anderson {Programmer Always} wrote: > Is their a way to get the size of all the files in a dir with php? >

« previous php.general (#33314) next »