Archive
class Archive (View source)
Properties
protected string | $targetDirectory | The directory where this archive will be unzipped. |
|
protected File | $f | File helper instance. |
Methods
No description
Moves an uploaded file to the tmp directory.
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.
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.
protected string
install($file, bool $inplace = false)
Installs a zip file from the passed directory.