+ // Can the next entry be read?
+ assert($this->getDirectoryInstance()->valid());
+
+ // Is it a dot directory?
+ if ($this->getDirectoryInstance()->isDot()) {
+ // Then call this method recursive
+ $current = $this->readRawDirectory();
+ } else {
+ // Read data from the directory pointer and return it
+ $current = $this->getDirectoryInstance()->current();
+ }
+
+ // Advance to next entry
+ $this->getDirectoryInstance()->next();
+
+ // Return found entry
+ return $current;