}
// 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);
*/
public function rewind () {
// Rewind the pointer
- assert(rewind($this->getPointer() === 1);
+ assert(rewind($this->getPointer()) === 1);
}
/**
*/
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);
}
}