API16

JArchiveZip/checkZipData

< API16:JArchiveZip

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Checks to see if the data is a valid ZIP file.


<! removed transcluded page call, red link never existed >

Syntax

checkZipData(&$data)
Parameter Name Default Value Description
&$data $data ZIP archive data buffer

Returns

boolean True if valid, false if invalid.

Defined in

libraries/joomla/filesystem/archive/zip.php

Importing

jimport( 'joomla.filesystem.archive.zip' );

Source Body

function checkZipData(& $data) {
        if (strpos($data, $this->_fileHeader) === false) {
                return false;
        } else {
                return true;
        }
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement