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