note 98155 rejected from recursivedirectoryiterator.construct by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: cataphract at php dot net 

----

The example is a bit misleading. The isDot call is there to remove the first three entries (the "." directory twice and then the ".." directory), which should not be there anyway because the default mode is "LEAVES_ONLY" and hence the directories should not be shown anyway.

The SPL iterators are designed for use in foreach. See http://bugs.php.net/bug.php?id=44063

In this case, the isDot call should be removed and a rewind call before the loop should be added.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.