PclZip::duplicate() –
You appear to be a bot. Output may be restricted
Description
Usage
PclZip::duplicate( $p_archive );
Parameters
- $p_archive
- ( mixed ) required –
Returns
void
Source
File name: wordpress/wp-admin/includes/class-pclzip.php
Lines:
1 to 43 of 43
function duplicate($p_archive) { $v_result = 1; // ----- Reset the error handler $this->PclZip::privErrorReset(); // ----- Look if the $p_archive is a PclZip object if (is_object($p_archive) && $p_archive instanceof pclzip) { // ----- Duplicate the archive $v_result = $this->PclZip::privDuplicate($p_archive->zipname); } // ----- Look if the $p_archive is a string (so a filename) else if (is_string($p_archive)) { // ----- Check that $p_archive is a valid zip file // TBC : Should also check the archive format if (!is_file($p_archive)) { // ----- Error log PclZip::PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); $v_result = PCLZIP_ERR_MISSING_FILE; } else { // ----- Duplicate the archive $v_result = $this->PclZip::privDuplicate($p_archive); } } // ----- Invalid variable else { // ----- Error log PclZip::PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); $v_result = PCLZIP_ERR_INVALID_PARAMETER; } // ----- Return return $v_result; }