ZipArchive::addFromString

(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0) Add a file to a ZIP archive using its contents bool ZipArchive::addFromString ( string $localname, string $contents ) Add a file to a ZIP archive using its contents. Parameters: localname The name of the entry to create. contents The contents to use to create the entry. It is used in a bi

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::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

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

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::__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

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.

RarEntry::isDirectory

(PECL rar >= 2.0.0) Test whether an entry represents a directory public bool RarEntry::isDirectory ( void ) Tests whether the current entry is a directory. Returns: Returns TRUE if this entry is a directory and FALSE otherwise.

RarEntry::getVersion

(PECL rar >= 0.1) Get minimum version of RAR program required to unpack the entry public int RarEntry::getVersion ( void ) Returns minimum version of RAR program (e.g. WinRAR) required to unpack the entry. It is encoded as 10 * major version + minor version. Returns: Returns the version or FALSE on error. Examples: RarEntry::getVers

RarEntry::getUnpackedSize

(PECL rar >= 0.1) Get unpacked size of the entry public int RarEntry::getUnpackedSize ( void ) Get unpacked size of the archive entry. Note: Note that on platforms with 32-bit longs (that includes Windows x64), the maximum size returned is capped at 2 GiB. Check the constant PHP_INT_MAX. Returns: Returns the unpacked size, or FALSE on error. Changelog: