RE : [PHP-DEV] suggestion SplFileInfo
| From: | P) | Date: | Tue, 27 Feb 2007 19:15:26 +0000 |
| Subject: | RE : [PHP-DEV] suggestion SplFileInfo | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28170@lists.php.net to get a copy of this message | ||
> From: Arnold Daniels [mailto:info@adaniels.nl]
> >> DirectoryIteratorRecursive:
> >> - Add flag DIRS_ONLY for the constructor, to only loop through
> >> directories
> >>
> > This is achieved by a FilterIterator: ParentIterator
> >
> Yes but if you want to loop recursively through the directories,
> creating an object for each file gives a huge overhead. Glob has a
> directory only flag, may that feature can be used.
One more argument for a PHP internal implementation of glob()/fnmatch(),
as GLOB_ONLYDIR is not portable (probably not posix-compliant). We could
also add a flag to exclude broken symbolic links, and globbing support
in stream wrappers (would allow a syntax like wget's 'ftp://dir/*').
I have written a feature request listing glob()-related problems 6
months ago (http://bugs.php.net/bug.php?id=38022). If somebody is interested,
it could be time to reactivate it (unfortunately, I won't have enough free
time to work on it).
Regards
Francois