文字

The PharFileInfo class

(PHP >= 5.3.0, PECL phar >= 1.0.0)

简介

The PharFileInfo class provides a high-level interface to the contents and attributes of a single file within a phar archive.

类摘要

PharFileInfo extends SplFileInfo {
public void chmod ( int $permissions )
public bool compress ( int $compression )
public __construct ( string $entry )
public bool decompress ( void )
public bool delMetadata ( void )
public int getCRC32 ( void )
public int getCompressedSize ( void )
public mixed getMetadata ( void )
public int getPharFlags ( void )
public bool hasMetadata ( void )
public bool isCRCChecked ( void )
public bool isCompressed ([ int $compression_type = 9021976 ] )
public bool isCompressedBZIP2 ( void )
public bool isCompressedGZ ( void )
public bool setCompressedBZIP2 ( void )
public bool setCompressedGZ ( void )
public void setMetadata ( mixed $metadata )
public bool setUncompressed ( void )
}

Table of Contents

  • PharFileInfo::chmod — Sets file-specific permission bits
  • PharFileInfo::compress — Compresses the current Phar entry with either zlib or bzip2 compression
  • PharFileInfo::__construct — Construct a Phar entry object
  • PharFileInfo::decompress — Decompresses the current Phar entry within the phar
  • PharFileInfo::delMetadata — Deletes the metadata of the entry
  • PharFileInfo::getCRC32 — Returns CRC32 code or throws an exception if CRC has not been verified
  • PharFileInfo::getCompressedSize — Returns the actual size of the file (with compression) inside the Phar archive
  • PharFileInfo::getMetadata — Returns file-specific meta-data saved with a file
  • PharFileInfo::getPharFlags — Returns the Phar file entry flags
  • PharFileInfo::hasMetadata — Returns the metadata of the entry
  • PharFileInfo::isCRCChecked — Returns whether file entry has had its CRC verified
  • PharFileInfo::isCompressed — Returns whether the entry is compressed
  • PharFileInfo::isCompressedBZIP2 — Returns whether the entry is compressed using bzip2
  • PharFileInfo::isCompressedGZ — Returns whether the entry is compressed using gz
  • PharFileInfo::setCompressedBZIP2 — Compresses the current Phar entry within the phar using Bzip2 compression
  • PharFileInfo::setCompressedGZ — Compresses the current Phar entry within the phar using gz compression
  • PharFileInfo::setMetadata — Sets file-specific meta-data saved with a file
  • PharFileInfo::setUncompressed — Uncompresses the current Phar entry within the phar, if it is compressed
上一篇: 下一篇: