Oihana PHP

TarExtension uses ConstantsTrait

FileExtension

Enumeration class that defines various file extension supported by the application.

Tags
author

Marc Alcaraz (ekameleon)

since
1.0.0

Table of Contents

Constants

TAR  = '.tar'
TAR_BZ2  = '.tar.bz2'
TAR_GZ  = '.tar.gz'
TAR_LZ  = '.tar.lz'
TAR_LZMA  = '.tar.lzma'
TAR_LZO  = '.tar.lzo'
TAR_XZ  = '.tar.xz'
TAR_Z  = '.tar.Z'
TAR_ZST  = '.tar.zst'
TBZ2  = '.tbz2'
TGZ  = '.tgz'
TXZ  = '.txz'

Methods

getCompressionExtension()  : string
Gets the file extension added by Phar compression.
getExtensionForCompression()  : string
Gets the appropriate file extension for a compression type.

Constants

Methods

getCompressionExtension()

Gets the file extension added by Phar compression.

public static getCompressionExtension(string $compression) : string
Parameters
$compression : string

The compression type.

Tags
throws
UnsupportedCompressionException
Return values
string

The extension added by compression.

getExtensionForCompression()

Gets the appropriate file extension for a compression type.

public static getExtensionForCompression(string $compression) : string
Parameters
$compression : string

The compression type.

Tags
throws
UnsupportedCompressionException
Return values
string

The file extension.


        
On this page

Search results