InputOutputPointer is the right interface.
[core.git] / inc / classes / main / file_directories / class_BaseFile.php
index bcc61661bba3d15533f1bbb5c51632daebf1dc7f..a2a3432aa6b3f83f1d729d27bd409b72aaea7ed6 100644 (file)
@@ -51,6 +51,20 @@ class BaseFile extends BaseFrameworkSystem {
                parent::__destruct();
        }
 
+       /**
+        * Initializes this file class
+        *
+        * @param       $fileName       Name of this abstract file
+        * @return      void
+        */
+       protected function initFile ($fileName) {
+               // Get a file i/o pointer instance
+               $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', array($fileName));
+
+               // ... and set it here
+               $this->setPointerInstance($pointerInstance);
+       }
+
        /**
         * Close a file source and set it's instance to null and the file name
         * to empty
@@ -84,39 +98,6 @@ class BaseFile extends BaseFrameworkSystem {
        public final function getFileName () {
                return $this->fileName;
        }
-
-       /**
-        * Determines seek position
-        *
-        * @return      $seekPosition   Current seek position
-        * @todo        0% done
-        */
-       public final function determineSeekPosition () {
-               $this->partialStub('Unfinished method.');
-       }
-
-       /**
-        * Seek to given offset (default) or other possibilities as fseek() gives.
-        *
-        * @param       $offset         Offset to seek to (or used as "base" for other seeks)
-        * @param       $whence         Added to offset (default: only use offset to seek to)
-        * @return      $status         Status of file seek: 0 = success, -1 = failed
-        * @todo        0% done
-        */
-       public function seek ($offset, $whence = SEEK_SET) {
-               $this->partialStub('Unfinished method.');
-       }
-
-       /**
-        * Size of this file
-        *
-        * @return      $size   Size (in bytes) of file
-        * @todo        Handle seekStatus
-        * @todo        0% done
-        */
-       public function size () {
-               $this->partialStub('Unfinished method.');
-       }
 }
 
 // [EOF]