note 98155 added to recursivedirectoryiterator.construct

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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.
----
Server IP: 81.92.192.129
Probable Submitter: 93.108.152.52
----
Manual Page -- http://www.php.net/manual/en/recursivedirectoryiterator.construct.php
Edit        -- https://master.php.net/note/edit/98155
Del: integrated  -- https://master.php.net/note/delete/98155/integrated
Del: useless     -- https://master.php.net/note/delete/98155/useless
Del: bad code    -- https://master.php.net/note/delete/98155/bad+code
Del: spam        -- https://master.php.net/note/delete/98155/spam
Del: non-english -- https://master.php.net/note/delete/98155/non-english
Del: in docs     -- https://master.php.net/note/delete/98155/in+docs
Del: other reasons-- https://master.php.net/note/delete/98155
Reject      -- https://master.php.net/note/reject/98155
Search      -- https://master.php.net/manage/user-notes.php
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.