Page 1 of 1

folder size

Posted: Fri Feb 01, 2008 12:30 pm
by m2babaey
Hi
nice style!
I know how to get an uploaded file size. but how can i measure the size of a folder and all of its contents it has inside?
thanks

Re: folder size

Posted: Fri Feb 01, 2008 12:34 pm
by Oren

Re: folder size

Posted: Fri Feb 01, 2008 6:39 pm
by Chris Corbyn
Oren wrote:filesize()
This will work in combination with opendir() and some recursive scanning for files.

If you're on a UNIX/Linux system then you can also do:

Code: Select all

$dirSize = `du -s /path/to/dir`;