This is my 1st suggestion to the internals :)
Anywho, there has been some discussion in the is_dir()
comments on
php.net (http://is.php.net/manual/en/function.is-dir.php) about a
function that returns bool if a directory is empty or not.
Just throwing it out there if it should be implemented to the current
list of Directory Functions.
$dir = dir("/foo/bar");
var_dump($dir->empty()); // bool(true)
Ólafur Waage
olafurw@gmail.com
Ólafur Waage escribió:
$dir = dir("/foo/bar");
var_dump($dir->empty()); // bool(true)
Use SplDirectoryIterator instead.
--
"We have art in order not to die of the truth" - Friedrich Nietzsche
Cristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/
Yes the SPL directory listing has more functionality but not the one i
am talking about. It's not something crucial but useful while
iterating through directories.
Oh and I should to sit down over the holidays and write examples for
the SPL Directory functions and send over to the documentation team.
Ólafur Waage
olafurw@gmail.com
On Wed, Dec 17, 2008 at 10:48 PM, Cristian Rodríguez
crrodriguez@suse.de wrote:
Ólafur Waage escribió:
$dir = dir("/foo/bar");
var_dump($dir->empty()); // bool(true)Use SplDirectoryIterator instead.
--
"We have art in order not to die of the truth" - Friedrich NietzscheCristian Rodríguez R.
Platform/OpenSUSE - Core Services
SUSE LINUX Products GmbH
Research & Development
http://www.opensuse.org/
Oh and I should to sit down over the holidays and write examples for
the SPL Directory functions and send over to the documentation team.
The email address for that task is phpdoc@lists.php.net :)
Regards,
Philip