Rewritten:
[core.git] / framework / main / classes / file_directories / binary / stack / class_StackFile.php
index 87b3c0b864960a606a4adeb1ab9ffe5ef4c8c5d1..0742767094c1e0445bd5191005617a0b5af939fe 100644 (file)
@@ -2,6 +2,14 @@
 // Own namespace
 namespace CoreFramework\Filesystem\Stack;
 
+// Import framework stuff
+use CoreFramework\Filesystem\Block;
+use CoreFramework\Filesystem\File\BaseBinaryFile;
+use CoreFramework\Generic\UnsupportedOperationException;
+
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A stack file class
  *
@@ -38,11 +46,11 @@ class StackFile extends BaseBinaryFile implements Block {
        /**
         * Creates an instance of this File class and prepares it for usage
         *
-        * @param       $fileName               Name of the stack file
+        * @param       $infoInstance   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 createStackFile ($fileName, Block $blockInstance) {
+       public final static function createStackFile (SplFileInfo $infoInstance, Block $blockInstance) {
                // Get a new instance
                $fileInstance = new StackFile();
 
@@ -50,7 +58,7 @@ class StackFile extends BaseBinaryFile implements Block {
                $fileInstance->setBlockInstance($blockInstance);
 
                // Init this abstract file
-               $fileInstance->initFile($fileName);
+               $fileInstance->initFile($infoInstance);
 
                // Return the prepared instance
                return $fileInstance;