note 4029 deleted from dirname by ronabop
| From: | ronabop@php.net | Date: | Sat, 12 Aug 2000 23:52:18 +0000 |
| Subject: | note 4029 deleted from dirname by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1774@lists.php.net to get a copy of this message | ||
This seems to work:
$does_this_dir_exist="/foo/" . "*";
dirname("$does_this_dir_exist"); #returns "/foo" if foo has any contents.
It is possible though, that the file already exists but is empty (in which case the above would
likely return "".) You can use "is_dir" to check for such things.