首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

PharFileInfo (class)

Introduction

(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.

Class synopsis

PharFileInfo extends SplFileInfo {

/* Methods */

代码语言:javascript
复制
public void chmod ( int $permissions )
代码语言:javascript
复制
public bool compress ( int $compression )
代码语言:javascript
复制
public __construct ( string $entry )
代码语言:javascript
复制
public bool decompress ( void )
代码语言:javascript
复制
public bool delMetadata ( void )
代码语言:javascript
复制
public int getCRC32 ( void )
代码语言:javascript
复制
public int getCompressedSize ( void )
代码语言:javascript
复制
public mixed getMetadata ( void )
代码语言:javascript
复制
public int getPharFlags ( void )
代码语言:javascript
复制
public bool hasMetadata ( void )
代码语言:javascript
复制
public bool isCRCChecked ( void )
代码语言:javascript
复制
public bool isCompressed ([ int $compression_type = 9021976 ] )
代码语言:javascript
复制
public bool isCompressedBZIP2 ( void )
代码语言:javascript
复制
public bool isCompressedGZ ( void )
代码语言:javascript
复制
public bool setCompressedBZIP2 ( void )
代码语言:javascript
复制
public bool setCompressedGZ ( void )
代码语言:javascript
复制
public void setMetadata ( mixed $metadata )
代码语言:javascript
复制
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

← PharData::setStub

PharFileInfo::chmod →

代码语言:txt
复制
 © 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券