/** Generate a tar/tgz/bz file * If you define $installer, this function will also put in * the archive a file (si) * * @param unknown_type $file * @param unknown_type $format * @param bool $installer filename for an instaler file */ function generateTarGz($file, $format = 'gz', $installer = null) { if (!class_exists('Archive_Tar')) { include $this->dataDir . '/archive_tar.php'; } $cp = new Archive_Tar($file, $format); $v_result = true; if (!$cp->_openWrite()) { return false; } foreach ($this->vfsFiles as $n => $v) { if (!$cp->_addString(substr($n, 1), $v)) { return false; } } $cp->_writeFooter(); $cp->_close(); return true; }