Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28218 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58435 invoked by uid 1010); 4 Mar 2007 13:48:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58420 invoked from network); 4 Mar 2007 13:48:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Mar 2007 13:48:02 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 85.214.94.56 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Received: from [85.214.94.56] ([85.214.94.56:56658] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/D8-09018-11ECAE54 for ; Sun, 04 Mar 2007 08:48:02 -0500 Received: from [192.168.1.3] (dslb-084-063-021-112.pools.arcor-ip.net [84.63.21.112]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id A9FD11B350F; Sun, 4 Mar 2007 14:47:58 +0100 (CET) Date: Sun, 4 Mar 2007 14:48:12 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1508893792.20070304144812@marcus-boerger.de> To: Pierre CC: kingwez@gmail.com, Arnold Daniels , In-Reply-To: References: <45E33990.8030806@adaniels.nl> <1331353216.20070226232944@marcus-boerger.de> <45E37D05.5040000@adaniels.nl> <408821909.20070303232323@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] suggestion SplFileInfo From: helly@php.net (Marcus Boerger) Hello Pierre, Sunday, March 4, 2007, 1:46:40 PM, you wrote: > On 3/3/07, Marcus Boerger wrote: >> Hello Arnold, >> >> I added glob directory stream support. Now you can do two things: >> >> $d1 = new DirectoryIterator("glob://mydir/*"); >> $d2 = new DirectoryIterator("mydir/*", DirectoryIterator::USE_GLOB); >> >> count() stuff will follow. > I'm not sure it is a good idea to add glob:// stream support. What > does it have to do with custom streams? Will we add pcre:// too? If someone feels he needs pcre:// and can implement it why not. > DirectoryIteratorPattern/Glob($pattern) make much more sense to me. Feel free to implement it. Until you do so the problem is that DirectoryIterator uses streams directory support and cannot do anything else. Thus the onlyway to change the way it works is to provide other streams. And that is what I did. I chose to go the easy route which even might help other people. > I did not test it but how does it work when used with other protocols? > like: ftp://some/path/? How is that going to work? Glob does not support that. But anyway, why not simply test it before complaining? > It may be more useful to add streams support to our glob functions. > But it can bring more troubles than expected. Actually the glob stream is exactly nothing else than streams layer for our glob functions. Best regards, Marcus