note 108319 deleted from function.scandir by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 17:10:17 +0000 |
| Subject: | note 108319 deleted from function.scandir by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187663@lists.php.net to get a copy of this message | ||
Note Submitter: twixly at gmail dot com
----
@author Fazle Elahee
I did a simple small change to get rid of all the "/." and "/.." t your
function, since most operations you'd want to do to files don't really need these paths.
In the middle of your function :
if(is_dir($path.DIRECTORY_SEPARATOR.$f) && $f != ".." && $f !=
"."){
scanFileNameRecursivly($path.DIRECTORY_SEPARATOR.$f, &$name);
}else if($f != ".." && $f != "."){
$name[] = $path.DIRECTORY_SEPARATOR.$f;
}