Function read_tgz_data
Extracts a file or files from the .tar.gz contained in data.
detects if the file is really a .zip file, and if so returns the result of read_zip_data
if destination is null - returns a list of files in the archive.
if single_file is true - returns the contents of the file specified by destination, if it exists, or false. - destination can start with * and / to signify that the file may come from any directory. - destination should not begin with a / if single_file is true.
overwrites existing files with newer modification times if and only if overwrite is true. creates the destination directory if it doesn't exist, and is is specified. requires zlib support be built into PHP. returns an array of the files extracted. if files_to_extract is not equal to null only extracts file within this array.
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Package.php
string |
$gzfilename |
The name of the file |
string |
$destination |
The destination |
boolean |
$single_file = false |
Whether to only extract a single file |
boolean |
$overwrite = false |
Whether to overwrite existing data |
null|array |
$files_to_extract = null |
If set, only extracts the specified files |
array|false
|
An array of information about the extracted files or false on failure |