ZipArchive::addFile

(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0) Adds a file to a ZIP archive from the given path bool ZipArchive::addFile ( string $filename [, string $localname = NULL [, int $start = 0 [, int $length = 0 ]]] ) Adds a file to a ZIP archive from a given path. Parameters: filename The path to the file to add. localname If supplied, t

ZipArchive::addGlob

(PHP 5 >= 5.3.0, PHP 7, PECL zip >= 1.9.0) Add files from a directory by glob pattern bool ZipArchive::addGlob ( string $pattern [, int $flags = 0 [, array $options = array() ]] ) Add files from a directory which match the glob pattern. Parameters: pattern A glob() pattern against which files will be matched. flags A bit mask of

ZipArchive::addEmptyDir

(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.8.0) Add a new directory bool ZipArchive::addEmptyDir ( string $dirname ) Adds an empty directory in the archive. Parameters: dirname The directory to add. Returns: Returns TRUE on success or FALSE on failure. Examples: Create a new director

RarEntry::isEncrypted

(PECL rar >= 2.0.0) Test whether an entry is encrypted public bool RarEntry::isEncrypted ( void ) Tests whether the current entry contents are encrypted. Note: The password used may differ between files inside the same RAR archive. Returns: Returns TRUE if the current entry is encrypted and FALSE otherwise.

RarException::setUsingExceptions

(PECL rar >= 2.0.0) Activate and deactivate error handling with exceptions public static void RarException::setUsingExceptions ( bool $using_exceptions ) If and only if the argument is TRUE, then, instead of emitting warnings and returning a special value indicating error when the UnRAR library encounters an error, an exception of type RarException will be thrown. Exceptions will also be thrown for the following errors

RarEntry::__toString

(PECL rar >= 2.0.0) Get text representation of entry public string RarEntry::__toString ( void ) RarEntry::__toString() returns a textual representation for this entry. It includes whether the entry is a file or a directory (symbolic links and other special objects will be treated as files), the UTF-8 name of the entry and its CRC. The form and content of this representation may be changed in the future, so they cannot be

RarException::isUsingExceptions

(PECL rar >= 2.0.0) Check whether error handling with exceptions is in use public static bool RarException::isUsingExceptions ( void ) Checks whether the RAR functions will emit warnings and return error values or whether they will throw exceptions in most of the circumstances (does not include some programmatic errors such as passing the wrong type of arguments). Returns: Returns TRUE if excep

RarEntry::getStream

(PECL rar >= 2.0.0) Get file handler for entry public resource RarEntry::getStream ([ string $password ] ) Returns a file handler that supports read operations. This handler provides on-the-fly decompression for this entry. The handler is not invalidated by calling rar_close(). Parameters: password The password used to encrypt this entry. If the entry is not encrypte

RarEntry::getHostOs

(PECL rar >= 0.1) Get entry host OS public int RarEntry::getHostOs ( void ) Returns the code of the host OS of the archive entry. Returns: Returns the code of the host OS, or FALSE on error. Examples: RarEntry::getHostOs() example (version >= 2.0.0) <?php $rar_file = rar_open('example.rar') or die("Failed to ope

RarEntry::getCrc

(PECL rar >= 0.1) Get CRC of the entry public string RarEntry::getCrc ( void ) Returns an hexadecimal string representation of the CRC of the archive entry. Returns: Returns the CRC of the archive entry or FALSE on error. Changelog: 2.0.0 This method now returns correct values for multiple volume archives.