|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| open ($archivepathname, $mode=file_archive::CREATE, $encoding='utf-8') | |
| close () | |
| get_stream ($index) | |
| get_info ($index) | |
| list_files () | |
| count () | |
| add_file_from_pathname ($localname, $pathname) | |
| add_file_from_string ($localname, $contents) | |
| add_directory ($localname) | |
| current () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Attributes | |
| $archivepathname = null | |
| $usedmem = 0 | |
| $pos = 0 | |
| $za | |
Definition at line 40 of file zip_archive.php.
| add_directory | ( | $ | localname | ) |
Add empty directory into archive
| string | $local |
Reimplemented from file_archive.
Definition at line 279 of file zip_archive.php.

| add_file_from_pathname | ( | $ | localname, |
| $ | pathname | ||
| ) |
Add file into archive
| string | $localname | name of file in archive |
| string | $pathname | location of file |
Reimplemented from file_archive.
Definition at line 206 of file zip_archive.php.

| add_file_from_string | ( | $ | localname, |
| $ | contents | ||
| ) |
Add content of string into archive
| string | $localname | name of file in archive |
| string | $contents |
this prevents running out of memory when adding many large files using strings
Reimplemented from file_archive.
Definition at line 247 of file zip_archive.php.

| close | ( | ) |
Close archive
Reimplemented from file_archive.
Definition at line 100 of file zip_archive.php.

| count | ( | ) |
Returns number of files in archive
Reimplemented from file_archive.
Definition at line 192 of file zip_archive.php.

| current | ( | ) |
Returns current file info
Definition at line 298 of file zip_archive.php.

| get_info | ( | $ | index | ) |
Returns file information
| int | $index | of file |
Reimplemented from file_archive.
Definition at line 134 of file zip_archive.php.


| get_stream | ( | $ | index | ) |
Returns file stream for reading of content
| int | $index | of file |
Reimplemented from file_archive.
Definition at line 116 of file zip_archive.php.
| key | ( | ) |
Returns the index of current file
Definition at line 310 of file zip_archive.php.
| list_files | ( | ) |
Returns array of info about all files in archive
Reimplemented from file_archive.
Definition at line 170 of file zip_archive.php.

| next | ( | ) |
| open | ( | $ | archivepathname, |
| $ | mode = file_archive::CREATE, |
||
| $ | encoding = 'utf-8' |
||
| ) |
Open or create archive (depending on $mode)
| string | $archivepathname | |
| int | $mode | OPEN, CREATE or OVERWRITE constant |
| string | $encoding | archive local paths encoding |
Reimplemented from file_archive.
Definition at line 61 of file zip_archive.php.


| rewind | ( | ) |
| valid | ( | ) |
Did we reach the end?
Definition at line 334 of file zip_archive.php.

$archivepathname = null [protected] |
Pathname of archive
Definition at line 43 of file zip_archive.php.
$pos = 0 [protected] |
Iteration position
Definition at line 49 of file zip_archive.php.
$usedmem = 0 [protected] |
Used memory tracking
Definition at line 46 of file zip_archive.php.
$za [protected] |
TipArchive instance
Definition at line 52 of file zip_archive.php.