Renamed Registry -> GenericRegistry to make it clear that this registry does
[core.git] / framework / main / classes / file_directories / binary / index / class_IndexFile.php
index 95aef97e22d5c1611cc9bbed6378edac7581c39a..958792df018ceb9420f4eb1b6b9d6182eb2fa370 100644 (file)
@@ -7,6 +7,9 @@ use Org\Mxchange\CoreFramework\Filesystem\Block;
 use Org\Mxchange\CoreFramework\Filesystem\File\BaseBinaryFile;
 use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * An index file class
  *
@@ -43,11 +46,11 @@ class IndexFile extends BaseBinaryFile implements Block {
        /**
         * Creates an instance of this File class and prepares it for usage
         *
-        * @param       $fileName               Name of the index file
+        * @param       $fileInfoInstance       An instance of a SplFileInfo class
         * @param       $blockInstance  An instance of a Block class
         * @return      $fileInstance   An instance of this File class
         */
-       public final static function createIndexFile ($fileName, Block $blockInstance) {
+       public final static function createIndexFile (SplFileInfo $fileInfoInstance, Block $blockInstance) {
                // Get a new instance
                $fileInstance = new IndexFile();
 
@@ -55,7 +58,7 @@ class IndexFile extends BaseBinaryFile implements Block {
                $fileInstance->setBlockInstance($blockInstance);
 
                // Init this abstract file
-               $fileInstance->initFile($fileName);
+               $fileInstance->initFile($fileInfoInstance);
 
                // Return the prepared instance
                return $fileInstance;