I\'m finalizing a code segment that lists the files in a directory. I have no problems listing the files in a directory but for some reason I can get the isDot() method to work
The other answer is excellent, but for a different approach you can set the
SKIP_DOTS
flag:
setFlags(RecursiveDirectoryIterator::SKIP_DOTS);
$o_iter = new RecursiveIteratorIterator($o_dir);
foreach ($o_iter as $o_info) {
echo $o_info->getPathname(), "\n";
}
https://php.net/filesystemiterator.setflags