‪TYPO3CMS  10.4
TYPO3\CMS\Core\Service\Archive\ZipService Class Reference

Public Member Functions

bool extract (string $fileName, string $directory)
 
bool verify (string $fileName)
 

Private Member Functions

 assertDirectoryIsWritable (string $directory)
 

Detailed Description

Service that handles zip creation and extraction

Definition at line 28 of file ZipService.php.

Member Function Documentation

◆ assertDirectoryIsWritable()

TYPO3\CMS\Core\Service\Archive\ZipService::assertDirectoryIsWritable ( string  $directory)
private
Parameters
string$directory

Definition at line 94 of file ZipService.php.

Referenced by TYPO3\CMS\Core\Service\Archive\ZipService\extract().

◆ extract()

bool TYPO3\CMS\Core\Service\Archive\ZipService::extract ( string  $fileName,
string  $directory 
)

Extracts the zip archive to a given directory. This method makes sure a file cannot be placed outside the directory.

Parameters
string$fileName
string$directory
Returns
‪bool
Exceptions
ExtractException

Definition at line 38 of file ZipService.php.

References TYPO3\CMS\Core\Service\Archive\ZipService\assertDirectoryIsWritable(), and TYPO3\CMS\Core\Utility\GeneralUtility\fixPermissions().

◆ verify()

bool TYPO3\CMS\Core\Service\Archive\ZipService::verify ( string  $fileName)
Parameters
string$fileName
Returns
‪bool
Exceptions
ExtractException

Definition at line 64 of file ZipService.php.