note 56350 added to function.directoryiterator-isfile

From: Date: Wed, 31 Aug 2005 11:29:06 +0000
Subject: note 56350 added to function.directoryiterator-isfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-94519@lists.php.net to get a copy of this message
Usage: <?php //open current directory $dir = new DirectoryIterator("."); // use do .. while since we need to iterate atleast once // and the first two items are always "." and ".." do { // if it isn't "." or ".." if (!$dir->isDot()) { // echo out pathname and "/" if it's a directory echo $dir->getPathname() . ($dir->isDir() ? "/" : ""); } } while ($dir->next()) ?> Outputs something like: /path/file1 /path/dir1/ /path/file2 /path/file3 /path/dir2/ ---- Manual Page -- http://www.php.net/manual/en/function.directoryiterator-isfile.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56350 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56350&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56350&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94519) next »