X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffile_directories%2Fdirectory%2Fclass_FrameworkDirectoryPointer.php;h=d7f346a1052a2d274354796e93ecf8b8633e542b;hp=64688af7ab1d674bff4d0da15e7a32a94dcf7ea3;hb=868c877607670760eb36e63ebeb1a04237907be9;hpb=146c8b3c929a1b0ab17d6605e5ae949ac44899c1 diff --git a/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php b/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php index 64688af7..d7f346a1 100644 --- a/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php +++ b/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php @@ -1,10 +1,11 @@ readRawDirectory(); @@ -174,17 +157,17 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework // Shall we exclude directories? if (is_object($currentEntry)) { // Get file name - $rawLine = $currentEntry->getFilename(); - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot())); + $fileInfoInstance = $currentEntry; + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot())); // Is it a dot-directory or excluded? - if (($this->getDirectoryIteratorInstance()->isDot()) || (in_array($rawLine, $except))) { + if (($this->getDirectoryIteratorInstance()->isDot()) && (!in_array($fileInfoInstance, $except))) { // To next entry $this->getDirectoryIteratorInstance()->next(); // Exclude this part - $rawLine = $this->readDirectoryExcept($except); - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!'); + $fileInfoInstance = $this->readDirectoryExcept($except); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ' - Recursive call!'); } // END - if } // END - if @@ -192,8 +175,8 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework $this->getDirectoryIteratorInstance()->next(); // Return read line - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine); - return $rawLine; + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance); + return $fileInfoInstance; } /**