PclZip::privCloseFd PHP Метод

privCloseFd() публичный Метод

--------------------------------------------------------------------------------
public privCloseFd ( )
    public function privCloseFd()
    {
        $v_result = 1;
        if ($this->zip_fd != 0) {
            @fclose($this->zip_fd);
        }
        $this->zip_fd = 0;
        // ----- Return
        return $v_result;
    }

Usage Example

Пример #1
0
 /**
  * Uncompress zip file using pclzip library
  *
  * @param $zipFile  string path to zip file
  * @param $extractPath  string path to location which will be extract to
  *
  * @return  boolean true if success, false if failure
  */
 function unZip($zipFile, $extractPath)
 {
     $pcl = new PclZip($zipFile);
     if (empty($pcl)) {
         return false;
     }
     $retVal = $pcl->extract(PCLZIP_OPT_PATH, $extractPath);
     $pcl->privCloseFd();
     return $retVal;
 }
All Usage Examples Of PclZip::privCloseFd