Difference between revisions of "JArchiveZip"
From Joomla! Documentation
(Layout updates) |
m (preparing for archive only) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | =={{JVer|11.1}} JArchiveZip== | |
− | + | ===Description=== | |
− | + | ||
− | {{ | + | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
+ | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
− | |[[JArchiveZip::checkZipData | + | |public |
+ | |[[API17:JArchiveZip::checkZipData|checkZipData]] | ||
|Checks to see if the data is a valid ZIP file. | |Checks to see if the data is a valid ZIP file. | ||
|- | |- | ||
− | |[[JArchiveZip::create | + | |public |
+ | |[[API17:JArchiveZip::create|create]] | ||
|Create a ZIP compressed file from an array of file data. | |Create a ZIP compressed file from an array of file data. | ||
|- | |- | ||
− | |[[JArchiveZip::extract | + | |public |
+ | |[[API17:JArchiveZip::extract|extract]] | ||
|Extract a ZIP compressed file to a given path. | |Extract a ZIP compressed file to a given path. | ||
|- | |- | ||
− | |[[JArchiveZip::hasNativeSupport | + | |public |
+ | |[[API17:JArchiveZip::hasNativeSupport|hasNativeSupport]] | ||
|Method to determine if the server has native zip support for faster handling. | |Method to determine if the server has native zip support for faster handling. | ||
|- | |- | ||
− | |[[JArchiveZip::_addToZIPFile | + | |protected |
+ | |[[API17:JArchiveZip::_addToZIPFile|_addToZIPFile]] | ||
|Adds a "file" to the ZIP archive. | |Adds a "file" to the ZIP archive. | ||
|- | |- | ||
− | |[[JArchiveZip::_createZIPFile | + | |protected |
+ | |[[API17:JArchiveZip::_createZIPFile|_createZIPFile]] | ||
|Creates the ZIP file. | |Creates the ZIP file. | ||
|- | |- | ||
− | |[[JArchiveZip::_extract | + | |protected |
+ | |[[API17:JArchiveZip::_extract|_extract]] | ||
|Extract a ZIP compressed file to a given path using a php based algorithm that only requires zlib support. | |Extract a ZIP compressed file to a given path using a php based algorithm that only requires zlib support. | ||
|- | |- | ||
− | |[[JArchiveZip::_extractNative | + | |protected |
+ | |[[API17:JArchiveZip::_extractNative|_extractNative]] | ||
|Extract a ZIP compressed file to a given path using native php api calls for speed. | |Extract a ZIP compressed file to a given path using native php api calls for speed. | ||
|- | |- | ||
− | |[[JArchiveZip::_getFileData | + | |protected |
+ | |[[API17:JArchiveZip::_getFileData|_getFileData]] | ||
|Returns the file data for a file by offsest in the ZIP archive. | |Returns the file data for a file by offsest in the ZIP archive. | ||
|- | |- | ||
− | |[[JArchiveZip::_getZipInfo | + | |protected |
+ | |[[API17:JArchiveZip::_getZipInfo|_getZipInfo]] | ||
|Get the list of files/data from a ZIP archive buffer. | |Get the list of files/data from a ZIP archive buffer. | ||
|- | |- | ||
− | |[[JArchiveZip::_unix2DOSTime | + | |protected |
+ | |[[API17:JArchiveZip::_unix2DOSTime|_unix2DOSTime]] | ||
|Converts a UNIX timestamp to a 4-byte DOS date and time format (date in high 2-bytes, time in low 2-bytes allowing magnitude comparison). | |Converts a UNIX timestamp to a 4-byte DOS date and time format (date in high 2-bytes, time in low 2-bytes allowing magnitude comparison). | ||
|- | |- | ||
|} | |} | ||
+ | * '''Defined in''' libraries/joomla/filesystem/archive/zip.php | ||
+ | * '''Extends''' [[API17:JObject|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.filesystem.archive.zip' );</source> | <source lang="php">jimport( 'joomla.filesystem.archive.zip' );</source> | ||
===See also=== | ===See also=== | ||
− | * JArchiveZip source code | + | * {{JVer|11.1}} '''JArchiveZip source code''' on [[jplatform:filesystem/archive/zip.php|BitBucket]] |
− | * [[ | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Filesystem|Filesystem]] |
− | + | * [[API17:JArchiveZip|Other versions of JArchiveZip]] | |
− | + | ||
− | + | ||
− | + | ===User contributed notes=== | |
− | ===Examples=== | + | === Code Examples === |
− | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JArchiveZip | category=JArchiveZip | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 21:20, 24 March 2017
The "API17" 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.
JArchiveZip[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | checkZipData | Checks to see if the data is a valid ZIP file. |
public | create | Create a ZIP compressed file from an array of file data. |
public | extract | Extract a ZIP compressed file to a given path. |
public | hasNativeSupport | Method to determine if the server has native zip support for faster handling. |
protected | _addToZIPFile | Adds a "file" to the ZIP archive. |
protected | _createZIPFile | Creates the ZIP file. |
protected | _extract | Extract a ZIP compressed file to a given path using a php based algorithm that only requires zlib support. |
protected | _extractNative | Extract a ZIP compressed file to a given path using native php api calls for speed. |
protected | _getFileData | Returns the file data for a file by offsest in the ZIP archive. |
protected | _getZipInfo | Get the list of files/data from a ZIP archive buffer. |
protected | _unix2DOSTime | Converts a UNIX timestamp to a 4-byte DOS date and time format (date in high 2-bytes, time in low 2-bytes allowing magnitude comparison). |
- Defined in libraries/joomla/filesystem/archive/zip.php
- Extends JObject
Importing[edit]
jimport( 'joomla.filesystem.archive.zip' );
See also[edit]
- JArchiveZip source code on BitBucket
- Subpackage Filesystem
- Other versions of JArchiveZip
User contributed notes[edit]
Code Examples[edit]