PackageArchive
class PackageArchive extends Archive (View source)
This class is responsible for unpacking themes that have been zipped and uploaded to the system.
\@package Pages
Properties
protected string | $targetDirectory | The directory where this archive will be unzipped. |
from Archive |
protected File | $f | File helper instance. |
from Archive |
Methods
No description
Unzips a file at a directory level by concatenating ".zip" onto the end of it.
Returns either the directory (if the archive itself contains files at the first level) or the subdirectory if, like many archiving programs, we the zip archive is a directory, THEN a list of files.
Installs a zip file from the passed directory.
No description
Details
__construct()
No description
protected string
uploadZipToTemp(string $file)
Moves an uploaded file to the tmp directory.
protected string
unzip(string $directory)
Unzips a file at a directory level by concatenating ".zip" onto the end of it.
unzip("/path/to/files/themes/mytheme") // will unzip "mytheme.zip"
```.
protected string
getArchiveDirectory(string $dir)
Returns either the directory (if the archive itself contains files at the first level) or the subdirectory if, like many archiving programs, we the zip archive is a directory, THEN a list of files.
string
install($file, bool $inplace = false)
Installs a zip file from the passed directory.
uninstall()
No description