// Can the next entry be read?
assert($this->getDirectoryIteratorInstance()->valid());
- // Default is FALSE
- $currentEntry = FALSE;
-
// Read data from the directory pointer and return it
$currentEntry = $this->getDirectoryIteratorInstance()->current();
return $this->readRawDirectory();
} elseif (!$this->getDirectoryIteratorInstance()->valid()) {
// No more left to read
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: EOD reached.');
return NULL;
}
if (is_object($currentEntry)) {
// Get file name
$rawLine = $currentEntry->getFilename();
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
- // Is it not excluded?
- if (in_array($rawLine, $except)) {
+ // Is it a dot-directory or excluded?
+ if (($this->getDirectoryIteratorInstance()->isDot()) || (in_array($rawLine, $except))) {
// To next entry
$this->getDirectoryIteratorInstance()->next();