note 62828 deleted from function.filesize by aidan

From: Date: Sat, 02 May 2009 11:18:50 +0000
Subject: note 62828 deleted from function.filesize by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154123@lists.php.net to get a copy of this message
Note Submitter: Jonas Sweden ---- <?php /* Recursive filesize, nothing new but a small one. The $self var as a convenience if i want to change functionname */ function filesize_r($path){ if(!file_exists($path)) return 0; if(is_file($path)) return filesize($path); $self = __FUNCTION__; $ret = 0; foreach(glob($path."/*") as $fn) $ret += $self($fn); return $ret; } ?>

« previous php.notes (#154123) next »