Function __global->tar_extract_to_folder
Definitions
sources/tar.php
- Extract all the files in the specified TAR file to the specified path.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| &$resource | array | Yes | No | required parameter | N/A | N/A | The TAR file handle |
| $path | PATH | No | No | required parameter | N/A | N/A | The path to the folder to extract to, relative to the base directory |
| $use_afm | boolean | No | No | False | N/A | N/A | Whether to extract via the AFM (assumes AFM has been set up prior to this function call) |
| $files | ?array | No | No | Null | N/A | N/A | The files to extract (null: all) |
| $comcode_backups | boolean | No | No | False | N/A | N/A | Whether to take backups of Comcode pages |
| $report_errors | boolean | No | No | True | N/A | N/A | Whether to report errors |
Preview
Code (PHP)
/**
* Extract all the files in the specified TAR file to the specified path.
*
* @param array $resource The TAR file handle
* @param PATH $path The path to the folder to extract to, relative to the base directory
* @param boolean $use_afm Whether to extract via the AFM (assumes AFM has been set up prior to this function call)
* @param ?array $files The files to extract (null: all)
* @param boolean $comcode_backups Whether to take backups of Comcode pages
* @param boolean $report_errors Whether to report errors
*/
function tar_extract_to_folder(array &$resource, string $path, bool $use_afm = false, ?array $files = null, bool $comcode_backups = false, bool $report_errors = true)
* Extract all the files in the specified TAR file to the specified path.
*
* @param array $resource The TAR file handle
* @param PATH $path The path to the folder to extract to, relative to the base directory
* @param boolean $use_afm Whether to extract via the AFM (assumes AFM has been set up prior to this function call)
* @param ?array $files The files to extract (null: all)
* @param boolean $comcode_backups Whether to take backups of Comcode pages
* @param boolean $report_errors Whether to report errors
*/
function tar_extract_to_folder(array &$resource, string $path, bool $use_afm = false, ?array $files = null, bool $comcode_backups = false, bool $report_errors = true)

