private function setHandle($mode)
    {
        $this->closeExistingHandle();

        $this->handle = fopen($this->file, $mode);

        return $this->handle;
    }
private function setHandle($mode)
    {
        $this->closeExistingHandle();

        $this->handle = fopen($this->file, $mode);

        return $this->handle;
    }
private function setHandle ( $ mode ) { $ this -> closeExistingHandle ( ) ; $ this -> handle = fopen ( $ this -> file , $ mode ) ; return $ this -> handle ; }
Set file handle

@param string $mode Mode for file opening

@return resource
Set file handle