Lines Matching full:archive

16 class Tar extends Archive
21 protected $comptype = Archive::COMPRESS_AUTO;
38 public function setCompression($level = 9, $type = Archive::COMPRESS_AUTO)
46 if($level == 0) $this->comptype = Archive::COMPRESS_NONE;
47 if($type == Archive::COMPRESS_NONE) $this->complevel = 0;
67 if ($this->comptype === Archive::COMPRESS_GZIP) {
69 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
83 * Read the contents of a TAR archive
85 * This function lists the files stored in the archive
87 …* The archive is closed afer reading the contents, because rewinding is not possible in bzip2 stre…
106 * Read the contents of a TAR archive and return each entry using yield
117 throw new ArchiveIOException('Can not read from a closed archive');
141 * Reads content of a current archive entry.
143 * Works only when iterating trough the archive using the generator returned
160 * Extract an existing TAR archive
168 …* By default this will extract all files found in the archive. You can restrict the output using t…
174 …* The archive is closed afer reading the contents, because rewinding is not possible in bzip2 stre…
188 throw new ArchiveIOException('Can not read from a closed archive');
271 if ($this->comptype == Archive::COMPRESS_AUTO) {
275 if ($this->comptype === Archive::COMPRESS_GZIP) {
277 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
292 * Add a file to the current TAR archive using an existing file in the filesystem
295 …* @param string|FileInfo $fileinfo either the name to us in archive (string) or a FileInfo oject w…
296 …* @throws ArchiveCorruptedException when the file changes while reading it, the archive will be co…
307 throw new ArchiveIOException('Archive has been closed, files can no longer be added');
349 … new ArchiveCorruptedException("The size of $file changed while reading, archive corrupted. read $…
359 * Add a file to the current TAR archive using the given $data as content
361 …* @param string|FileInfo $fileinfo either the name to us in archive (string) or a FileInfo oject w…
372 throw new ArchiveIOException('Archive has been closed, files can no longer be added');
392 * Add the closing footer to the archive if in write mode, close all file handles
394 * After a call to this function no more data can be added to the archive, for
397 …* "Physically, an archive consists of a series of file entries terminated by an end-of-archive ent…
417 if ($this->comptype === Archive::COMPRESS_GZIP) {
419 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
434 * Returns the created in-memory archive data
436 * This implicitly calls close() on the Archive
443 if ($this->comptype === Archive::COMPRESS_AUTO) {
444 $this->comptype = Archive::COMPRESS_NONE;
447 if ($this->comptype === Archive::COMPRESS_GZIP) {
450 if ($this->comptype === Archive::COMPRESS_BZIP) {
457 * Save the created in-memory archive data
468 if ($this->comptype === Archive::COMPRESS_AUTO) {
485 if ($this->comptype === Archive::COMPRESS_GZIP) {
487 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
508 } elseif ($this->comptype === Archive::COMPRESS_GZIP) {
510 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
516 throw new ArchiveIOException('Failed to write to archive stream');
530 if ($this->comptype === Archive::COMPRESS_GZIP) {
532 } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
720 if ($comptype === Archive::COMPRESS_GZIP && !function_exists('gzopen')) {
724 if ($comptype === Archive::COMPRESS_BZIP && !function_exists('bzopen')) {
734 … * You don't need to call this yourself. It's used when you pass Archive::COMPRESS_AUTO somewhere
748 if(strpos($magic, "\x42\x5a") === 0) return Archive::COMPRESS_BZIP;
749 if(strpos($magic, "\x1f\x8b") === 0) return Archive::COMPRESS_GZIP;
755 return Archive::COMPRESS_GZIP;
757 return Archive::COMPRESS_BZIP;
760 return Archive::COMPRESS_NONE;