function Archive_Tar::_close in Acquia Connector 6.2
10 calls to Archive_Tar::_close()
- Archive_Tar::addString in acquia_agent/
archive_tar.inc - This method add a single string as a file at the end of the existing archive. If the archive does not yet exists it is created.
- Archive_Tar::createModify in acquia_agent/
archive_tar.inc - This method creates the archive file and add the files / directories that are listed in $p_filelist. If the file already exists and is writable, it is replaced by the new tar. It is a create and not an add. If the file exists and is read-only or is a…
- Archive_Tar::extractInString in acquia_agent/
archive_tar.inc - This method extract from the archive one file identified by $p_filename. The return value is a string with the file content, or NULL on error.
- Archive_Tar::extractList in acquia_agent/
archive_tar.inc - This method extract from the archive only the files indicated in the $p_filelist. These files are extracted in the current directory or in the directory indicated by the optional $p_path parameter. If indicated the $p_remove_path can be used in the…
- Archive_Tar::extractModify in acquia_agent/
archive_tar.inc - This method extract all the content of the archive in the directory indicated by $p_path. When relevant the memorized path of the files/dir can be modified by removing the $p_remove_path path at the beginning of the file/dir path. While extracting a…
File
- acquia_agent/
archive_tar.inc, line 760
Class
- Archive_Tar
- Creates a (compressed) Tar archive
Code
function _close() {
//if (isset($this->_file)) {
if (is_resource($this->_file)) {
if ($this->_compress_type == 'gz') {
@gzclose($this->_file);
}
else {
if ($this->_compress_type == 'bz2') {
@bzclose($this->_file);
}
else {
if ($this->_compress_type == 'none') {
@fclose($this->_file);
}
else {
$this
->_error('Unknown or missing compression type (' . $this->_compress_type . ')');
}
}
}
$this->_file = 0;
}
// ----- Look if a local copy need to be erase
// Note that it might be interesting to keep the url for a time : ToDo
if ($this->_temp_tarname != '') {
@unlink($this->_temp_tarname);
$this->_temp_tarname = '';
}
return true;
}