Re: Getting Dir Size?
| From: | Chris Anderson {Programmer Always} | Date: | Mon, 08 Jan 2001 16:57:43 +0000 |
| Subject: | Re: Getting Dir Size? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33315@lists.php.net to get a copy of this message | ||
maybe i should get the maual with the comments eh?
----- Original Message -----
From: "Philip Olson" <philip@theprojects.org>
To: "Chris Anderson {Programmer Always}" <chrisderson@ameritech.net>
Cc: "PHP" <php-general@lists.php.net>
Sent: Monday, January 08, 2001 4:17 PM
Subject: Re: [PHP] Getting Dir Size?
> 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?
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>