use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator;
use Org\Mxchange\CoreFramework\Stacker\BaseStacker;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* A general file-based stack class
*
/**
* 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));
* 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);