| Línea 282... |
Línea 282... |
| 282 |
* @param file_packer $packer File packer instance
|
282 |
* @param file_packer $packer File packer instance
|
| 283 |
* @param string $pathname Target directory
|
283 |
* @param string $pathname Target directory
|
| 284 |
* @param file_progress $progress progress indicator callback or null if not required
|
284 |
* @param file_progress $progress progress indicator callback or null if not required
|
| 285 |
* @return array|bool List of processed files; false if error
|
285 |
* @return array|bool List of processed files; false if error
|
| 286 |
*/
|
286 |
*/
|
| 287 |
public function extract_to_pathname(stored_file $file, file_packer $packer, $pathname, file_progress $progress = null) {
|
287 |
public function extract_to_pathname(stored_file $file, file_packer $packer, $pathname, ?file_progress $progress = null) {
|
| 288 |
$archivefile = $this->get_local_path_from_storedfile($file, true);
|
288 |
$archivefile = $this->get_local_path_from_storedfile($file, true);
|
| 289 |
return $packer->extract_to_pathname($archivefile, $pathname, null, $progress);
|
289 |
return $packer->extract_to_pathname($archivefile, $pathname, null, $progress);
|
| 290 |
}
|
290 |
}
|
| Línea 291... |
Línea 291... |
| 291 |
|
291 |
|
| Línea 302... |
Línea 302... |
| 302 |
* @param int $userid user ID
|
302 |
* @param int $userid user ID
|
| 303 |
* @param file_progress $progress Progress indicator callback or null if not required
|
303 |
* @param file_progress $progress Progress indicator callback or null if not required
|
| 304 |
* @return array|bool list of processed files; false if error
|
304 |
* @return array|bool list of processed files; false if error
|
| 305 |
*/
|
305 |
*/
|
| 306 |
public function extract_to_storage(stored_file $file, file_packer $packer, $contextid,
|
306 |
public function extract_to_storage(stored_file $file, file_packer $packer, $contextid,
|
| 307 |
$component, $filearea, $itemid, $pathbase, $userid = null, file_progress $progress = null) {
|
307 |
$component, $filearea, $itemid, $pathbase, $userid = null, ?file_progress $progress = null) {
|
| Línea 308... |
Línea 308... |
| 308 |
|
308 |
|
| 309 |
// Since we do not know which extractor we have, and whether it supports remote paths, use a local path here.
|
309 |
// Since we do not know which extractor we have, and whether it supports remote paths, use a local path here.
|
| 310 |
$archivefile = $this->get_local_path_from_storedfile($file, true);
|
310 |
$archivefile = $this->get_local_path_from_storedfile($file, true);
|
| 311 |
return $packer->extract_to_storage($archivefile, $contextid,
|
311 |
return $packer->extract_to_storage($archivefile, $contextid,
|