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


Public Member Functions | |
| archive_to_storage ($files, $contextid, $component, $filearea, $itemid, $filepath, $filename, $userid=NULL) | |
| archive_to_pathname ($files, $archivefile) | |
| extract_to_pathname ($archivefile, $pathname) | |
| extract_to_storage ($archivefile, $contextid, $component, $filearea, $itemid, $pathbase, $userid=NULL) | |
| list_files ($archivefile) | |
Definition at line 41 of file zip_packer.php.
| archive_to_pathname | ( | $ | files, |
| $ | archivefile | ||
| ) |
Zip files and store the result in os file
| array | $files | array with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file or archivepath=>array('content_as_string')) |
| string | $archivefile | path to target zip file |
Reimplemented from file_packer.
Definition at line 92 of file zip_packer.php.

| archive_to_storage | ( | $ | files, |
| $ | contextid, | ||
| $ | component, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | filepath, | ||
| $ | filename, | ||
| $ | userid = NULL |
||
| ) |
Zip files and store the result in file storage
| array | $files | array with full zip paths (including directory information) as keys (archivepath=>ospathname or archivepath/subdir=>stored_file or archivepath=>array('content_as_string')) |
| int | $contextid | |
| string | $component | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath | |
| string | $filename |
Reimplemented from file_packer.
Definition at line 55 of file zip_packer.php.

| extract_to_pathname | ( | $ | archivefile, |
| $ | pathname | ||
| ) |
Unzip file to given file path (real OS filesystem), existing files are overwrited
| mixed | $archivefile | full pathname of zip file or stored_file instance |
| string | $pathname | target directory |
Reimplemented from file_packer.
Definition at line 181 of file zip_packer.php.
| extract_to_storage | ( | $ | archivefile, |
| $ | contextid, | ||
| $ | component, | ||
| $ | filearea, | ||
| $ | itemid, | ||
| $ | pathbase, | ||
| $ | userid = NULL |
||
| ) |
Unzip file to given file path (real OS filesystem), existing files are overwrited
| mixed | $archivefile | full pathname of zip file or stored_file instance |
| int | $contextid | |
| string | $component | |
| string | $filearea | |
| int | $itemid | |
| string | $filepath |
Reimplemented from file_packer.
Definition at line 278 of file zip_packer.php.

| list_files | ( | $ | archivefile | ) |
Returns array of info about all files in archive
Reimplemented from file_packer.
Definition at line 419 of file zip_packer.php.