note 98155 added to recursivedirectoryiterator.construct

From: Date: Fri, 28 May 2010 16:19:10 +0000
Subject: note 98155 added to recursivedirectoryiterator.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-169694@lists.php.net to get a copy of this message
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

« previous php.notes (#169694) next »