class Reader
Class Elibyy\Reader
this class is abstract layer for the adapters for files
Methods
__construct(string $file)
initiate a new instance of the reader with the file specified |
||
Adapter |
getAdapter()
returns the current adapter instance provided by {@link Reader#_getAdapter(string $file)} |
|
mixed |
unzip(string $destination = null, string|array $entries = null)
|
|
string |
getFilename()
this function returns the loaded archive name from the adapter |
|
mixed |
getArchive()
returns the archive object from the adapter |
|
File[] |
getFiles()
returns an array of {@link File} object to iterate on |
|
int |
getFilesCount()
returns the number of files in the archive |
|
string |
getComment()
returns the archive comment from the adapter |
|
Adapter |
setComment(string $comment)
|
|
Adapter |
addFolder(string $path, string $parent = null)
adds a new folder to the archive recursively |
|
bool |
addFile(string $path, string $localName = null, int $start, int $length = null)
adds a new file into the archive |
|
Adapter |
updateArchive()
refreshes the archive in the adapter |
|
bool |
removeFileByObject(File $file)
removes a file from the archive using a {@link File} Object |
|
bool |
removeFileByName(string $name)
removes a file from the archive using the file name in the archive |
|
bool |
addGlob(string $glob, int $flags = GLOB_BRACE, array $options = array())
adds files using |
|
bool |
addPattern(string $pattern, string $directory, array $options = array())
|
|
Adapter |
compress(string $format)
creates a new archive from the current archive with the new format specified |
Details
at line 43
public
__construct(string $file)
initiate a new instance of the reader with the file specified
at line 113
public Adapter
getAdapter()
returns the current adapter instance provided by {@link Reader#_getAdapter(string $file)}
at line 127
public mixed
unzip(string $destination = null, string|array $entries = null)
at line 138
public string
getFilename()
this function returns the loaded archive name from the adapter
at line 149
public mixed
getArchive()
returns the archive object from the adapter
at line 160
public File[]
getFiles()
returns an array of {@link File} object to iterate on
at line 171
public int
getFilesCount()
returns the number of files in the archive
at line 182
public string
getComment()
returns the archive comment from the adapter
at line 193
public Adapter
setComment(string $comment)
at line 207
public Adapter
addFolder(string $path, string $parent = null)
adds a new folder to the archive recursively
at line 223
public bool
addFile(string $path, string $localName = null, int $start, int $length = null)
adds a new file into the archive
at line 234
public Adapter
updateArchive()
refreshes the archive in the adapter
at line 247
public bool
removeFileByObject(File $file)
removes a file from the archive using a {@link File} Object
at line 260
public bool
removeFileByName(string $name)
removes a file from the archive using the file name in the archive
at line 284
public bool
addGlob(string $glob, int $flags = GLOB_BRACE, array $options = array())
adds files using
at line 298
public bool
addPattern(string $pattern, string $directory, array $options = array())
at line 311
public Adapter
compress(string $format)
creates a new archive from the current archive with the new format specified