note 54698 modified in function.filesize by aidan

From: Date: Sat, 02 May 2009 11:20:05 +0000
Subject: note 54698 modified in function.filesize by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154128@lists.php.net to get a copy of this message
This function quickly calculates the size of a directory: http://aidanlister.com/repos/v/function.dirsize.php You can convert filesizes to a human readable size using: http://aidanlister.com/repos/v/function.size_readable.php For a faster (unix only) implementation, see function.disk-total-space, note #34100 http://www.php.net/manual/en/function.disk-total-space.php#34100 Also of interest is this wikipedia article, discussing the difference between a kilobyte (1000) and a kibibyte (1024). http://en.wikipedia.org/wiki/Bytes --was-- This function uses a stack array to get the size of a directory. http://aidanlister.com/repos/v/function.dirsize.php You can convert this to a human readable size using: http://aidanlister.com/repos/v/function.size_readable.php For a faster (unix only) implementation, see function.disk-total-space, note #34100 http://www.php.net/manual/en/function.disk-total-space.php#34100 Also of interest is this wikipedia article, discussing the difference between a kilobyte (1000) and a kibibyte (1024). http://en.wikipedia.org/wiki/Bytes http://php.net/manual/en/function.filesize.php

« previous php.notes (#154128) next »