Continued:
[core.git] / framework / main / classes / file_directories / directory / class_FrameworkDirectoryPointer.php
index eba7d4233626e2be5688b0a235250d7d14be79dd..4c033024fac389928d9ee40f961e22d9e21ca572 100644 (file)
@@ -133,7 +133,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
         * Read lines from the current directory pointer except some parts
         *
         * @param       $except         Some parts of a directory we want to ignore. Valid: directory and file names, other values will be silently ignored
-        * @return      string          Directory and/or file names read from the current directory pointer
+        * @return      SplFileInfo             An instance of a SplFileInfo class
         */
        public function readDirectoryExcept (array $except = array()) {
                // No exceptions given?
@@ -148,7 +148,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                }
 
                // Init raw line
-               $rawLine = NULL;
+               $fileInfoInstance = NULL;
 
                // Read a raw line...
                $currentEntry = $this->readRawDirectory();
@@ -157,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
 
@@ -175,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;
        }
 
        /**