Moodle  2.2.1
http://www.collinsharper.com
zip_packer Class Reference
Inheritance diagram for zip_packer:
Collaboration diagram for zip_packer:

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)

Detailed Description

Definition at line 41 of file zip_packer.php.


Member Function Documentation

archive_to_pathname ( files,
archivefile 
)

Zip files and store the result in os file

Parameters:
array$filesarray with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file or archivepath=>array('content_as_string'))
string$archivefilepath to target zip file
Returns:
bool success

Reimplemented from file_packer.

Definition at line 92 of file zip_packer.php.

Here is the caller graph for this function:

archive_to_storage ( files,
contextid,
component,
filearea,
itemid,
filepath,
filename,
userid = NULL 
)

Zip files and store the result in file storage

Parameters:
array$filesarray 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
Returns:
mixed false if error stored file instance if ok

Reimplemented from file_packer.

Definition at line 55 of file zip_packer.php.

Here is the call graph for this function:

extract_to_pathname ( archivefile,
pathname 
)

Unzip file to given file path (real OS filesystem), existing files are overwrited

Parameters:
mixed$archivefilefull pathname of zip file or stored_file instance
string$pathnametarget directory
Returns:
mixed list of processed files; false if error

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

Parameters:
mixed$archivefilefull pathname of zip file or stored_file instance
int$contextid
string$component
string$filearea
int$itemid
string$filepath
Returns:
mixed list of processed files; false if error

Reimplemented from file_packer.

Definition at line 278 of file zip_packer.php.

Here is the call graph for this function:

list_files ( archivefile)

Returns array of info about all files in archive

Returns:
array of file infos

Reimplemented from file_packer.

Definition at line 419 of file zip_packer.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations