Method |
Description |
|
__construct ( Illuminate\Filesystem\Filesystem $fs = null ) |
Constructor |
|
__destruct ( ) |
Destructor |
|
add ( $pathToAdd, $fileName = null ) |
Add one or multiple files to the zip. |
|
addEmptyDir ( $dirName ) : void |
Add an empty directory |
|
addString ( $filename, $content ) |
Add a file to the zip using its contents |
|
close ( ) |
Closes the zip file and frees all handles |
|
contains ( $fileInArchive ) : boolean |
Checks if a file is present in the archive |
|
delete ( ) |
Deletes the archive file |
|
extractTo ( $path, array $files = [], integer $method = Zipper::BLACKLIST ) |
Extracts the opened zip archive to the specified location
you can provide an array of files and folders and define if they should be a white list
or a black list to extract. |
|
folder ( $path ) |
Sets the internal folder to the given path.
Useful for extracting only a segment of a zip file. |
|
getArchiveType ( ) : string |
Get the type of the Archive |
|
getCurrentFolderPath ( ) : string |
Get the current internal folder pointer |
|
getFileContent ( $filePath ) : mixed |
Gets the content of a single file if available |
|
getFileHandler ( ) : Illuminate\Filesystem\Filesystem |
|
|
getFilePath ( ) : string |
Returns the path of the current zip file if there is one. |
|
getInternalPath ( ) : string |
Gets the path to the internal folder |
|
getRepository ( ) : Chumper\Zipper\Repositories\RepositoryInterface |
|
|
getStatus ( ) : integer |
Gets the status of the zip. |
|
home ( ) |
Resets the internal folder to the root of the zip file. |
|
listFiles ( ) : array |
List files that are within the archive |
|
make ( $pathToFile, Chumper\Zipper\Repositories\RepositoryInterface | string $type = 'zip' ) |
Create a new zip Archive if the file does not exists
opens a zip archive if the file exists |
|
phar ( $pathToFile ) |
Create a new phar file or open one |
|
rar ( $pathToFile ) |
Create a new rar file or open one |
|
remove ( $fileToRemove ) |
Remove a file or array of files and folders from the zip archive |
|
usePassword ( $password ) : boolean |
Sets the password to be used for decompressing |
|
zip ( $pathToFile ) |
Create a new zip archive or open an existing one |
|