PharData::compress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses the entire tar/zip archive using Gzip or Bzip2 compression object PharData::compress ( int $compression [, string $extension ] ) For tar archives, this method compresses the entire archive using gzip compression or bzip2 compression. The resulting file can be processed with the gunzip command/bunzip command, or accessed directly and transparently with the Phar extension.

PharData::compressFiles

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses all files in the current tar/zip archive bool PharData::compressFiles ( int $compression ) For tar-based archives, this method throws a BadMethodCallException, as compression of individual files within a tar archive is not supported by the file format. Use PharData::compress() to compress an entire tar-based archive. For Zip-based archives, this method compresses all file

PharData::__construct

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a non-executable tar or zip archive object PharData::__construct ( string $fname [, int $flags [, string $alias [, int $format = Phar::TAR ]]] ) Parameters: fname Path to an existing tar/zip archive or to-be-created archive flags Flags to pass to Phar parent class RecursiveDirectoryItera

PharData::convertToData

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a phar archive to a non-executable tar or zip file PharData PharData::convertToData ([ int $format [, int $compression [, string $extension ]]] ) This method is used to convert a non-executable tar or zip archive to another non-executable format. If no changes are specified, this method throws a BadMethodCallException. This method should be used to convert a tar archive to z

PharData::convertToExecutable

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a non-executable tar/zip archive to an executable phar archive Phar PharData::convertToExecutable ([ int $format [, int $compression [, string $extension ]]] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. This method is used to convert a non-executable tar or zip arc

PharData::copy

(PHP >= 5.3.0, PECL phar >= 2.0.0) Copy a file internal to the phar archive to another new file within the phar bool PharData::copy ( string $oldfile, string $newfile ) Copy a file internal to the tar/zip archive to another new file within the same archive. This is an object-oriented alternative to using copy() with the phar stream wrapper. Parameters: oldfile Copy

PharData::decompress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses the entire Phar archive object PharData::decompress ([ string $extension ] ) For tar-based archives, this method decompresses the entire archive. For Zip-based archives, this method fails with an exception. The zlib extension must be enabled to decompress an archive compressed with gzip compression, and the bzip2 extension must be enabled in order to decompress an archi

PharData::decompressFiles

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses all files in the current zip archive bool PharData::decompressFiles ( void ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. For tar-based archives, this method throws a BadMethodCallException, as compression of individual files within a tar archive is not supporte

PharData::delMetadata

(PHP >= 5.3.0, PECL phar >= 2.0.0) Deletes the global metadata of a zip archive bool PharData::delMetadata ( void ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Deletes the global metadata of the zip archive Returns: returns TRUE on success, but it is better to check for thrown exc

PharData::delete

(PHP >= 5.3.0, PECL phar >= 2.0.0) Delete a file within a tar/zip archive bool PharData::delete ( string $entry ) Delete a file within an archive. This is the functional equivalent of calling unlink() on the stream wrapper equivalent, as shown in the example below. Parameters: entry Path within an archive to the file to delete. Returns: ret