Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
Interface for callback from tgz_extractor\extract. More...
Public Member Functions | |
tgz_directory ($archivepath, $mtime) | |
Called when a directory entry is found in the archive. | |
tgz_end_file ($archivepath, $realpath) | |
Called when the system has finished extracting a file. | |
tgz_start_file ($archivepath) | |
Called when the system begins to extract a file. | |
Interface for callback from tgz_extractor\extract.
The file functions will be called (in pairs tgz_start_file, tgz_end_file) for each file in the archive. (There is only one exception, the special .ARCHIVE_INDEX file which is not reported to the handler.)
The directory function is called whenever the archive contains a directory entry.
tgz_extractor_handler::tgz_directory | ( | $archivepath, | |
$mtime ) |
Called when a directory entry is found in the archive.
The handler can create a corresponding directory if required.
string | $archivepath | Path and name of directory within archive |
int | $mtime | Modified time of directory |
bool | True if directory was created, false if skipped |
Implemented in tgz_packer_extract_to_pathname, and tgz_packer_extract_to_storage.
tgz_extractor_handler::tgz_end_file | ( | $archivepath, | |
$realpath ) |
Called when the system has finished extracting a file.
The handler can now process the extracted file if required.
string | $archivepath | Path and name of file within archive |
string | $realpath | Path in filesystem (from tgz_start_file return) |
bool | True to continue processing, false to abort archive extract |
Implemented in tgz_packer_extract_to_pathname, and tgz_packer_extract_to_storage.
tgz_extractor_handler::tgz_start_file | ( | $archivepath | ) |
Called when the system begins to extract a file.
At this point, the handler must decide where on disk the extracted file should be located. This can be a temporary location or final target, as preferred.
The handler can request for files to be skipped, in which case no data will be written and tgz_end_file will not be called.
string | $archivepath | Path and name of file within archive |
string | Location for output file in filesystem, or null to skip file |
Implemented in tgz_packer_extract_to_pathname, and tgz_packer_extract_to_storage.