The PharFileInfo class
Introduction
(PHP 5 >= 5.3.0, PHP 7, 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 */
public chmod ( int $permissions ) : void
public compress ( int $compression ) : bool
public __construct ( string $entry )
public decompress ( ) : bool
public delMetadata ( ) : bool
public getCRC32 ( ) : int
public getCompressedSize ( ) : int
public getContent ( ) : string
public getMetadata ( ) : mixed
public getPharFlags ( ) : int
public hasMetadata ( ) : bool
public isCRCChecked ( ) : bool
public isCompressed ([ int $compression_type = 9021976 ] ) : bool
public setMetadata ( mixed $metadata ) : void
/* Inherited methods */
public SplFileInfo::getATime ( ) : int
public SplFileInfo::getBasename ([ string $suffix ] ) : string
public SplFileInfo::getCTime ( ) : int
public SplFileInfo::getExtension ( ) : string
public SplFileInfo::getFileInfo ([ string $class_name ] ) : SplFileInfo
public SplFileInfo::getFilename ( ) : string
public SplFileInfo::getGroup ( ) : int
public SplFileInfo::getInode ( ) : int
public SplFileInfo::getLinkTarget ( ) : string
public SplFileInfo::getMTime ( ) : int
public SplFileInfo::getOwner ( ) : int
public SplFileInfo::getPath ( ) : string
public SplFileInfo::getPathInfo ([ string $class_name ] ) : SplFileInfo
public SplFileInfo::getPathname ( ) : string
public SplFileInfo::getPerms ( ) : int
public SplFileInfo::getRealPath ( ) : string
public SplFileInfo::getSize ( ) : int
public SplFileInfo::getType ( ) : string
public SplFileInfo::isDir ( ) : bool
public SplFileInfo::isExecutable ( ) : bool
public SplFileInfo::isFile ( ) : bool
public SplFileInfo::isLink ( ) : bool
public SplFileInfo::isReadable ( ) : bool
public SplFileInfo::isWritable ( ) : bool
public SplFileInfo::openFile ([ string $open_mode = "r" [, bool $use_include_path = false [, resource $context = null ]]] ) : SplFileObject
public SplFileInfo::setFileClass ([ string $class_name = "SplFileObject" ] ) : void
public SplFileInfo::setInfoClass ([ string $class_name = "SplFileInfo" ] ) : void
public SplFileInfo::__toString ( ) : string}
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::getContent — Get the complete file contents of the entry
- 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::setMetadata — Sets file-specific meta-data saved with a file
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.pharfileinfo.php