/** * Hook that is called just after an object is unserialized. */ public function doUnSerialize() { // Recreate fp $pos = $this->_fp; $this->_fp = $this->_File->createResource($this->_Flags, stream_context_create($this->_Options)); // Restore fp if ($pos && ($this->_Flags & IFile::APPEND) == 0) { fseek($this->_fp, $pos); } }