note 92978 deleted from function.is-dir by danbrown

From: Date: Tue, 18 Aug 2009 02:46:36 +0000
Subject: note 92978 deleted from function.is-dir by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159585@lists.php.net to get a copy of this message
Note Submitter: erlend dot graff at gmail dot com ---- Isn't this safer? <?php function is_dir_empty($dir) { return ($files = @scandir($dir)) && !count(array_diff($files, array(".", ".."))); } ?>

« previous php.notes (#159585) next »