You are here

function PclZip::privCheckFormat in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php \PclZip::privCheckFormat()
6 calls to PclZip::privCheckFormat()
PclZip::delete in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::extract in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::extractByIndex in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::listContent in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php
PclZip::merge 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 1373

Class

PclZip

Code

function privCheckFormat($p_level = 0) {
  $v_result = true;

  // ----- Reset the file system cache
  clearstatcache();

  // ----- Reset the error handler
  $this
    ->privErrorReset();

  // ----- Look if the file exits
  if (!is_file($this->zipname)) {

    // ----- Error log
    PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '" . $this->zipname . "'");
    return false;
  }

  // ----- Check that the file is readeable
  if (!is_readable($this->zipname)) {

    // ----- Error log
    PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '" . $this->zipname . "'");
    return false;
  }

  // ----- Check the magic code
  // TBC
  // ----- Check the central header
  // TBC
  // ----- Check each file header
  // TBC
  // ----- Return
  return $v_result;
}