You are here

function PclZip::privOpenFd in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php \PclZip::privOpenFd()
6 calls to PclZip::privOpenFd()
PclZip::privAdd in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::privCreate in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::privDeleteByRule in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::privDuplicate in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::privExtractByRule in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php

... See full list

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php, line 2338

Class

PclZip

Code

function privOpenFd($p_mode) {
  $v_result = 1;

  // ----- Look if already open
  if ($this->zip_fd != 0) {

    // ----- Error log
    PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->zipname . '\' already open');

    // ----- Return
    return PclZip::errorCode();
  }

  // ----- Open the zip file
  if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) {

    // ----- Error log
    PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in ' . $p_mode . ' mode');

    // ----- Return
    return PclZip::errorCode();
  }

  // ----- Return
  return $v_result;
}