Continued:
[core.git] / framework / main / classes / stacker / file / class_BaseFileStack.php
index 0989592c7c8d1daf5ce4d769c76061e88e9e0fd9..1f20c0bc5dbc295b9e9edeb1d874136f5a49f940 100644 (file)
@@ -9,6 +9,9 @@ use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator;
 use Org\Mxchange\CoreFramework\Stacker\BaseStacker;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A general file-based stack class
  *
@@ -166,14 +169,14 @@ abstract class BaseFileStack extends BaseStacker {
        /**
         * Initializes this file-based stack.
         *
-        * @param       $fileName       File name of this stack
+        * @param       $fileInfoInstance       An instance of a SplFileInfo class
         * @param       $type           Type of this stack (e.g. url_source for URL sources)
         * @return      void
         * @todo        Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file.
         */
-       protected function initFileStack ($fileName, $type) {
+       protected function initFileStack (SplFileInfo $fileInfoInstance, $type) {
                // Get a stack file instance
-               $fileInstance = ObjectFactory::createObjectByConfiguredName('stack_file_class', array($fileName, $this));
+               $fileInstance = ObjectFactory::createObjectByConfiguredName('stack_file_class', array($fileInfoInstance, $this));
 
                // Get iterator instance
                $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_iterator_class', array($fileInstance));
@@ -216,7 +219,7 @@ abstract class BaseFileStack extends BaseStacker {
                 * Get stack index instance. This can be used for faster
                 * "defragmentation" and startup.
                 */
-               $indexInstance = FileStackIndexFactory::createFileStackIndexInstance($fileName, $type);
+               $indexInstance = FileStackIndexFactory::createFileStackIndexInstance($fileInfoInstance, $type);
 
                // And set it here
                $this->setIndexInstance($indexInstance);