note 20254 deleted from function.is-dir by jimw
| From: | jimw@php.net | Date: | Thu, 18 Apr 2002 21:28:54 +0000 |
| Subject: | note 20254 deleted from function.is-dir by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29554@lists.php.net to get a copy of this message | ||
A way safer method of verifying if a file is a dir than the one described above (I just don' t
like that rmdir()... besides it didn' t work with me).
function is_directory($filepath) {
// $filepath must be the entire system path to the file
if (!@opendir($filepath)) return FALSE;
else {
return TRUE;
closedir($filepath);
}
};