public function saveToDisk($file = null)
    {
        if ($file !== null && is_string($file)) {
            if (file_exists($file) && !(is_file($file) && is_writable($file))) {
                throw new OdfException('Permission denied : can\'t create ' . $file);
            }
            $this->_save();
            copy($this->tmpfile, $file);
        } else {
            $this->_save();
        }
    }
public function saveToDisk($file = null)
    {
        if ($file !== null && is_string($file)) {
            if (file_exists($file) && !(is_file($file) && is_writable($file))) {
                throw new OdfException('Permission denied : can\'t create ' . $file);
            }
            $this->_save();
            copy($this->tmpfile, $file);
        } else {
            $this->_save();
        }
    }
public function saveToDisk ( $ file = null ) { if ( $ file !== null && is_string ( $ file ) ) { if ( file_exists ( $ file ) && ! ( is_file ( $ file ) && is_writable ( $ file ) ) ) { throw new OdfException ( 'Permission denied : can\'t create ' . $ file ) ; } $ this -> _save ( ) ; copy ( $ this -> tmpfile , $ file ) ; } else { $ this -> _save ( ) ; } }
Save the odt file on the disk

@param string $file name of the desired file
@throws OdfException
@return void
Save the odt file on the disk