Moodle  2.2.1
http://www.collinsharper.com
file_packer Class Reference
Inheritance diagram for file_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 38 of file file_packer.php.


Member Function Documentation

archive_to_pathname ( files,
archivefile 
) [abstract]

Archive files and store the result in os file

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

Reimplemented in zip_packer.

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

Archive files and store the result in file storage

Parameters:
array$filesarray with zip paths as keys (archivepath=>ospathname or archivepath=>stored_file)
int$contextid
string$component
string$filearea
int$itemid
string$filepath
string$filename
Returns:
mixed false if error stored file instance if ok

Reimplemented in zip_packer.

extract_to_pathname ( archivefile,
pathname 
) [abstract]

Extract 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 in zip_packer.

Here is the caller graph for this function:

extract_to_storage ( archivefile,
contextid,
component,
filearea,
itemid,
pathbase,
userid = NULL 
) [abstract]

Extract 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 in zip_packer.

Here is the caller graph for this function:

list_files ( archivefile) [abstract]

Returns array of info about all files in archive

Returns:
array of file infos

Reimplemented in zip_packer.

Here is the caller graph for this function:


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