Zippy API
Interface

Alchemy\Zippy\Archive\MemberInterface

interface MemberInterface

Methods

String getLocation()

Gets the location of an archive member

Boolean isDir()

Tells whether the member is a directory or not

getLastModifiedDate()

Integer getSize()

Returns the (uncompressed) size of the member

SplFileInfo extract(String|null $to = null)

Extract the member from its archive

__toString()

Details

at line 21
public String getLocation()

Gets the location of an archive member

Return Value

String

at line 28
public Boolean isDir()

Tells whether the member is a directory or not

Return Value

Boolean

at line 35
public getLastModifiedDate()

at line 44
public Integer getSize()

Returns the (uncompressed) size of the member

If the size is unknown, returns -1

Return Value

Integer

at line 60
public SplFileInfo extract(String|null $to = null)

Extract the member from its archive

Be carefull using this method within a loop
This will execute one extraction process for each file
Prefer the use of ArchiveInterface::extractMembers in that use case

Parameters

String|null $to The path where to extract the member, if no path is not provided the member is extracted in the same direcoty of its archive

Return Value

SplFileInfo The extracted file

Exceptions

RuntimeException In case of failure
InvalidArgumentException In case no members could be removed or provide extract target direcotry is not valid

at line 65
public __toString()