X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffile_directories%2Fio%2Fclass_FrameworkFileInputOutputPointer.php;h=198c5b09df6c463f8bcdd9a4ee8f84b1d24f7bad;hb=8557e30c478c289b89a8dc241eb55b838aead662;hp=36c81898d8ebfd008245ae17461710a24d052e2e;hpb=3c5ce56adcf758f877b74bbf1285d6cca1549a5e;p=core.git diff --git a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php index 36c81898..198c5b09 100644 --- a/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/classes/main/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -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); @@ -121,11 +121,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP /** * Rewinds to the beginning of the file * - * @return void + * @return $status Status of this operation */ public function rewind () { // Rewind the pointer - assert(rewind($this->getPointer()) === 1); + return rewind($this->getPointer()); } /** @@ -133,11 +133,11 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * * @param $seekPosition Seek position in file * @param $whence "Seek mode" (see http://de.php.net/fseek) - * @return void + * @return $status Status of this operation */ public function seek ($seekPosition, $whence = SEEK_SET) { // Move the file pointer - assert(fseek($this->getPointerInstance(), $seekPosition, $whence) === 0); + return fseek($this->getPointer(), $seekPosition, $whence); } }