The 'c' mode will do the following:
[core.git] / inc / classes / main / file_directories / io / class_FrameworkFileInputOutputPointer.php
index cebb1fad9229640ca38b27f845fe6a8f9cbb6a03..b167fee3d363d409865c577e24500c5d2e9534d7 100644 (file)
@@ -57,7 +57,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
                }
 
                // Try to open a handler
-               $filePointer = fopen($fileName, 'a+b');
+               $filePointer = fopen($fileName, 'c+b');
                if ((is_null($filePointer)) || ($filePointer === FALSE)) {
                        // Something bad happend
                        throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
@@ -125,7 +125,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         */
        public function rewind () {
                // Rewind the pointer
-               assert(rewind($this->getPointer() === 1);
+               assert(rewind($this->getPointer()) === 1);
        }
 
        /**
@@ -137,7 +137,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP
         */
        public function seek ($seekPosition, $whence = SEEK_SET) {
                // Move the file pointer
-               assert(fseek($this->getPointerInstance(), $seekPosition, $whence) === 0);
+               assert(fseek($this->getPointer(), $seekPosition, $whence) === 0);
        }
 }