API16

Difference between revisions of "JArchiveZip/checkZipData"

From Joomla! Documentation

< API16:JArchiveZip
(New page: ===Description=== Checks to see if the data is a valid ZIP file. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JArchiveZip/checkZipData|Edit Descri...)
 
Line 17: Line 17:
 
!Description
 
!Description
 
|-
 
|-
|  
+
| &$data
 
|  
 
|  
 
|  $data ZIP archive data buffer  
 
|  $data ZIP archive data buffer  

Revision as of 05:11, 30 March 2010

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[edit]

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

[Edit Descripton]

Template:Description:JArchiveZip/checkZipData

Syntax[edit]

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

Returns[edit]

boolean True if valid, false if invalid.

Defined in[edit]

libraries/joomla/filesystem/archive/zip.php

Importing[edit]

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

Source Body[edit]

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

[Edit See Also] Template:SeeAlso:JArchiveZip/checkZipData

Examples[edit]

<CodeExamplesForm />