Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Philip Olson
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 php...@lists.php.net :) Regards, Philip -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: h

Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Ólafur Waage
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 te

Re: [PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Cristian Rodríguez
Ó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 & Devel

[PHP-DEV] Is Empty functionality to the Directory Functions

2008-12-17 Thread Ólafur Waage
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 t